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 / Power Apps / Virtual Table problems...
Power Apps
Answered

Virtual Table problems with Service Principal

(0) ShareShare
ReportReport
Posted on by 19

I have a service principal set up that I can use in power automate without issue.

 

I have been trying all evening to create a virtual table using Azure SQL as the data source and service principal as authentication but just can't get this to work, has anyone done this successfully? Using 'Microsoft Entra ID integrated' as authentication to create the connection works fine, I just can't seem to do the same using the service prinpical.

 

Any suggestions welcome 🙂   Thanks

I have the same question (0)
  • martinmcmahon Profile Picture
    19 on at

    So it looks like service principal authentication is only available in power automate 😞

  • Verified answer
    ivan_apps Profile Picture
    2,189 Moderator on at

    I would agree with you - based on this article you can only choose your logged in account or sql server auth to connect on-prem. Perhaps it’s because it can’t generate a connection with an unlicensed service principal? Seems like a service account user would have to initiate the connection so it’s not tied to your account.

    https://learn.microsoft.com/en-us/power-apps/maker/data-platform/create-virtual-tables-using-connectors?tabs=sql#create-the-virtual-table

  • Suggested answer
    Tim Schneider Profile Picture
    2 on at

    Dataverse Virtual Tables + SQL (Service Principal): the steps that actually work

    TL;DR: The Virtual Table wizard won’t let you pick a SQL connection that uses a Service Principal (even if you created it). It also doesn’t become selectable after creating a new SPN connection from inside the wizard. The workaround is to author with a user (Entra ID) connection, then switch the connection reference to the SPN and share it with Virtual Connector Provider.

    The steps

    • Create the VT with a user (Entra ID) SQL connection using the Virtual Table wizard.
    Why: the wizard doesn’t list the SPN SQL connection as a selectable option—even if you created it, and even if you add a new SPN connection from within the wizard and refresh.
    • Repoint the connection reference to the SPN connection.

    In your solution, open the connection reference used by the VT and change it to the SQL connection that uses your Service Principal.

    • Share the SPN SQL connection with Virtual Connector Provider → “Can use”.

    Go to Connections → your SQL (SPN) connection → Share, add Virtual Connector Provider with role “Can use”. This unblocks Web API calls because the VT runtime needs permission to use that connection server-side.

    • Test the Web API.

    Call GET https://<org>.crm.dynamics.com/api/data/v9.2/<entityset>?$top=1 with your normal user token. No special SPN token is required

    Why this flow

    • The wizard currently won’t surface SPN connections as selectable, so you can’t author the VT with SPN directly.
    • After creation, switching the connection reference to SPN and sharing it with Virtual Connector Provider makes both model-driven app and Web API work consistently.
     
     
     
  • mannybellas1 Profile Picture
    5 on at
    @Moderator please  make @Tim Schneider's answer the verified answer, as it is more useful than the other responses, and helped solve my issues about how to get the virtual table work with an SPN connection.

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 > Power Apps

#1
Valantis Profile Picture

Valantis 481

#2
WarrenBelz Profile Picture

WarrenBelz 379 Most Valuable Professional

#3
11manish Profile Picture

11manish 291

Last 30 days Overall leaderboard