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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / Azure SQL Knowledge En...
Copilot Studio
Answered

Azure SQL Knowledge End User Authentication

(0) ShareShare
ReportReport
Posted on by 68
Hi,
 
I have added Azure SQL as knowledge source for my custom agent and have set up a service principal which it could use to access the data. It seems to work when I am testing in Copilot Studio, but when other users are trying to use the agent to connect to the SQL database it prompts them to connect/authenticate - see below.
 
 
When they click "Allow" it shows below error:
 
 
For the end users that would be extremely confusing. And I was kind of hoping that by setting the service principal the agent would use the credentials to login to the database and bypass the above dialogues. But that is not the case unfortunately.
 
Is there any possible way to get around this and allow the end users to use a shared connection which would then avoid the above dialogues please?
 
Many thanks!
Categories:
I have the same question (0)
  • Verified answer
    Sunil Kumar Pashikanti Profile Picture
    2,318 Moderator on at
     
    Your Copilot Studio agent can access Azure SQL using a service principal during testing, but end users are still prompted to authenticate at runtime. This happens because Azure SQL knowledge sources do not support true shared/service connections for end users. At runtime, Copilot Studio evaluates connections in the user context, not the agent’s service principal, so users without direct SQL access are prompted and then fail to connect, causing confusion and errors.

    There is currently no supported way to fully bypass end‑user authentication for Azure SQL knowledge sources in Copilot Studio. Even if a service principal is configured, runtime access still requires each user to have permission to the SQL connection.
     
    What you can do instead:
         Use a middle tier (Azure Function / API / Power Automate flow) authenticated by a service principal, and expose data via an API or HTTP connector.
         Publish data through a supported shared connector (Dataverse, Power BI semantic model, SharePoint, or Azure AI Search).
         Azure SQL cannot be used as a true shared connection for knowledge today.

    To avoid user prompts, move Azure SQL access behind an API or sync data to a platform that supports shared, app‑only access.
     
    ✅ If this answer helped resolve your issue, please mark it as Accepted so it can help others with the same problem.
    👍 Feel free to Like the post if you found it useful.
  • SS-01071009-0 Profile Picture
    68 on at
    Thanks Sunil.
     
    That is unfortunate. Are there any plans for improvements on this in the near future?
     
    Many thanks,
    Sasho
  • Sunil Kumar Pashikanti Profile Picture
    2,318 Moderator on at
     
    As of now, there’s no publicly committed ETA for app‑only/shared connection support for Azure SQL knowledge sources. If this changes, it will likely show up first in Microsoft Learn release notes or Copilot Studio blogs/docs.
     
    Please mark this as the answer so others with the same question can find the solution.
     
    Regards,
    Sunil

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Copilot Studio

#1
Valantis Profile Picture

Valantis 277

#2
11manish Profile Picture

11manish 206

#3
sannavajjala87 Profile Picture

sannavajjala87 156 Super User 2026 Season 1

Last 30 days Overall leaderboard