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 connecto...
Power Apps
Unanswered

Virtual table connector "Forbidden : tokenexchange"

(0) ShareShare
ReportReport
Posted on by

Hi all,

 

I'm following https://docs.microsoft.com/en-us/power-apps/developer/data-platform/virtual-entities/create-virtual-tables-using-connectors to pull data from SQL into a virtual table. I have followed all the steps, but when viewing the table "Entity Catalog for <connector>", it shows an error under the data tab - 

APIM request was not successful : Forbidden : tokenexchange

When viewing the HTTP request from the browser, the response expands to 

{"error":{"code":"0x80040224","message":"APIM request was not successful : Forbidden : tokenexchange","@Microsoft.PowerApps.CDS.HelpLink":"http://go.microsoft.com/fwlink/?LinkID=398563&error=Microsoft.Crm.CrmException%3a80040224&client=platform","@Microsoft.PowerApps.CDS.TraceText":"\r\n[Microsoft.Xrm.DataProvider.Connector.Plugins: Microsoft.Xrm.DataProvider.Connector.Plugins.ConnectorRetrieveMultiplePlugin]\r\n[ac343ee9-84b6-ec11-9841-0022481b4478: External plug-in implementation]\r\n\r\n","@Microsoft.PowerApps.CDS.InnerError.Message":"APIM request was not successful : Forbidden : tokenexchange"}}

joshhodgson_0-1649345030585.png

Has anyone come across this before? I have seen it this week in a couple of tenants and haven't been able to work out a fix.

 

  • jburston Profile Picture
    12 on at

    Hi Josh,

    I've been tryng to get to the bottom of this issue but I'm stumped. It appears to work for SQL Instances within Azure but falls over when using an On-Premises Gateway. I tried a simple setup with SQLExpress running through a Gateway - works fine within a flow and a SQL connection, but not via the Virtual Datasource.

    I setup Postman to make API calls to Dataverse using the App registered for the Virtual datasource, no problems pulling data from existing tables, but falls over when using the gateway.

    It could be a permissions related issue to the service-bus or API Management endpoint the gateway is connecting to, which would probably require specific API permissions and admin consent, or simply a bug.

    I work with an MVP who is using his channels to track this down, hopefully I'll get an answer and will keep you posted.

     

    Cheers,

    Jon

  • Nhelgren Profile Picture
    Microsoft Employee on at

    @joshhodgson when you set up the SQL connector, did you include the gateway information?

  • jburston1 Profile Picture
    8 on at

    Hi Josh,

    This appears to have been fixed. I ran a test yesterday after spotting the documentation had been updated. I was able to create the entity catalogue and virtual tables, whereas before I got the same APIM error you received. Works with SQL Express 2019 in my dev environment. I was also able to setup the relationships, which just worked.

    This is a real game changer for my clients who have extensive SQL backend models they would like to turn into apps.

     

    Give it another try: 

    https://docs.microsoft.com/en-us/power-apps/developer/data-platform/virtual-entities/create-virtual-tables-using-connectors?tabs=sql

     

    Hope this helps

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 411 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 338

#3
WarrenBelz Profile Picture

WarrenBelz 256 Most Valuable Professional

Last 30 days Overall leaderboard