web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Apps - Connector Development
Suggested answer

Other user couldn't access the sql server source in power apps

(2) ShareShare
ReportReport
Posted on by 7

I built a Power Apps application with data stored in SQL Server, connected via Azure AD authentication.

This works for me but prevents other colleagues from accessing the data when I share the app with them. they can't access the data with a prompt :401 Error retrieving data from network: Login failed for user ''. clientRequestId: 

Would creating a dedicated SQL Server account and using SQL Server Authentication to login as the connection method willsolve this issue,

allowing shared access to the app’s data source?

Categories:
I have the same question (0)
  • Suggested answer
    developerAJ Profile Picture
    4,577 on at
    Other user couldn't access the sql server source in power apps

    Azure AD Authentication

    Ensure users have direct access to SQL.

    Create an Azure AD security group, add the required users, and assign this group the appropriate SQL roles.

     

    SQL Server Authentication

    When using SQL Server Authentication, the app connects using the SQL account credentials.

    All operations (read/write/create) are performed under that SQL account, regardless of which user opens the app.

    In short, yes — it will work.

     

    If this solution helped you resolve your issue, kindly mark it as accepted — it makes it easier for others to find and also closes the discussion. If you found it useful, a Like ❤️ would be greatly appreciated!

    🏷️ Please tag me @developerAJ if you still have any queries or issue persists

    🤝 Let’s connect on LinkedIn 

    📘 Explore more on my articles

    🐱‍💻 Github Link

    💼👥 Looking for Jobs Power Platform & Microsoft Jobs Network

  • Suggested answer
    wolenberg_ Profile Picture
    985 Moderator on at
    Other user couldn't access the sql server source in power apps
    This happens because the SQL connection in Power Apps is tied to **your Azure AD identity**. When colleagues open the app, Power Apps tries to authenticate them against SQL using their own accounts if those accounts don’t have access to the database, they’ll hit the 401 error.  
     
    Options to fix it

    - Grant Azure AD access: The recommended approach is to give each user (or a security group) the right permissions on the SQL database via Azure AD. That way they can connect with their own identity.  
    - Use SQL Authentication: Yes, you can create a dedicated SQL account and build the connection with SQL Authentication. This will work for shared access, but it means everyone uses the same credentials, which is less secure and harder to manage.  
    - Service account approach: If you want a middle ground, create a managed service account with limited rights and use that for the connection.  
     
    In short: creating a SQL Authentication account will “work,” but the best practice is to configure Azure AD access for your colleagues so they can connect with their own identities.  
     
     
    If this helped or could help others in the community, feel free to give it a like or a kudo — it helps surface useful answers for everyone!
  • Suggested answer
    VGKolar Profile Picture
    8 on at
    Other user couldn't access the sql server source in power apps

    This happens because your SQL connection uses Azure AD authentication tied to your identity. When your colleagues open the app, Power Apps tries to authenticate them against SQL via Azure AD, but they don’t have access to the SQL database. That’s why SQL returns the “401 Login failed for user” message.

    The correct fix is not to create a shared SQL username/password. You need to add each colleague or an Azure AD group, as an Azure AD user inside the SQL database and assign the required roles. Once the users are added to SQL with Azure AD authentication, they’ll be able to use the Power Apps SQL connection without errors.

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Coming soon: forum hierarchy changes

In our never-ending quest to improve we are simplifying the forum hierarchy…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 710 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 313 Super User 2025 Season 2

#3
SebS Profile Picture

SebS 236 Moderator

Last 30 days Overall leaderboard

Featured topics