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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Power Apps and SQL Ser...
Power Apps
Unanswered

Power Apps and SQL Server Service Principal login help

(1) ShareShare
ReportReport
Posted on by
I am currently building a canvas app that is utilizing the more recent sql connectors that do not require the need to be run through power automate. When I share the app, it is prompting first time users to provide the service principal tenant id, client id, and client secret. I want this connection to be logged in on behalf of the user without having to provide these details to every user in my organization. How do I do this?

I have already created a service principal and I am able to use it fine when editing the app itself. This was done using the an app service in azure. I have also gone into my connectors and shared power app to the service principal app.

I have provided a screenshot of what I am looking at below:



How the connector was shared:
I have the same question (0)
  • Jon Unzueta Profile Picture
    1,827 Super User 2025 Season 2 on at

    You're encountering this issue because, by default, Power Apps requires each user to authenticate when using a SQL Server connection—unless you're using a secure implicitly shared connection or a shareable Service Principal Name (SPN) connection.

    Here’s how you can resolve this and avoid prompting users for the tenant ID, client ID, and client secret:


    ✅ Use Secure Implicit Connections (Recommended)

    As of early 2024, Microsoft introduced secure implicit connections, which allow app users to connect to SQL Server using the credentials of the app maker (or service principal), without exposing the connection or requiring user input.

    To implement this:

    1. Ensure your app is using the new SQL connector that supports secure implicit connections.
    2. Create the connection using a service principal (which you've already done).
    3. Share the app, but do not share the connection explicitly. Power Apps will use the secure implicit connection behind the scenes.
    4. Ensure the service principal has the necessary permissions on the SQL Server and database.

    Important: If users are still being prompted, it may be because the connection was shared explicitly or the app is not using the secure implicit connection model.


    🔄 Use Shareable Service Principal Connections

    Microsoft also introduced shareable SPN-based connections. These allow you to create a SQL Server connection using a service principal and share it with users without requiring them to enter credentials.

    Steps:

    1. In Power Apps, go to Data > Connections.
    2. Create a new SQL Server connection using the Service Principal option.
    3. When prompted, enter the Tenant ID, Client ID, and Client Secret.
    4. After creation, do not share the connection directly. Instead, share the app, and Power Apps will use the SPN connection implicitly.

    🧼 Clean Up Old Connections

    If your app was previously using an older connection method (like implicit or explicit user-based connections), users might still be prompted. To fix this:

    • Remove old connections from the app.
    • Reconnect using the new SPN-based or secure implicit connection.
    • Republish and reshare the app.
     
    If the response is helpful to you, a like or mark as the correct solution. thank you so much!
  • AK-28051048-0 Profile Picture
    2 on at
    Hi,
    To allow Power Apps users to use this connection you need to set it up on a Flow level. You need to edit the Run only Users, where you share the flow with users and provide the connection reference for them to use. It will not ask them for credentials.

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

Forum hierarchy changes are complete!

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

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard