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 / Error testing custom c...
Power Apps
Unanswered

Error testing custom connector in GCC

(1) ShareShare
ReportReport
Posted on by 14

I'm getting the following token error when trying to test a new custom connector.

 

Is this an issue or limitation with the current state of the Government Community Cloud (GCC) instances of PowerApps?

 

-

During the setup of a new connector, when clicking "Test operation" on step 4. Test.

 

Error Message:   Operation failed (400), see response below
 
Request
Method get
Headers
{
"Authorization": "Bearer ........"
}
 
Response
Status
tokenexchange (400)
Headers
{
"content-length": "340",
"content-type": "application/json",
"x-ms-apihub-cached-response": "false",
"x-ms-failure-cause": "apihub-token-exchange"
}
Body
{
"status": 400,
"source": "https://power-apis-usgov001-public.token.azure-apihub.us:443/tokens/power-apis-usgov001-public/nd.2Daddress.2Dservice.5F8db0ae354d4d7dd5.5Fb30b4aa1e41b2b53/4aeb457172b342a39167cf48db26775b/exchange",
"message": "Error from token exchange: Bad authorization token. The access token is from wrong audience or resource."
}
 
Categories:
  • v-yuxima-msft Profile Picture
    Microsoft Employee on at

    Hi @ecornell ,

     

    You should use a different set of URLs to access PowerApps US Government

    More information:

    powerapps-us-government#powerapps-us-government-service-urls

     

    And more information about GCC

    powerapps-us-government

     

    Hope this could be helpful.

     

    Best Regards.

    Yumia

  • ecornell Profile Picture
    14 on at

    We are using the new government URLs to create and test the connector.

     

    https://gov.web.powerapps.us/environments/Default-2dea0464-da51-4a88-bae2-b3db94bc0c54/customconnectors

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @ecornell are you still receiving this error? 

     

    @Anonymous 

  • ecornell Profile Picture
    14 on at

    Yes, the error is still occuring.

  • jayeshmhatre Profile Picture
    2 on at

    Is this issue resolved? We're still getting this on our environment. Thanks.

  • ecornell Profile Picture
    14 on at

    No, custom connectors are still broken in our GCC environment.

  • ThinkHaven Profile Picture
    5 on at

    Hi, I'm working for another organization using GCC and we are running into this same error message while doing the same thing. We've validated in a regular commercial tenant that everything works as expected but the same settings in a GCC tenant are resulting in this error.

    We thought it could have something to do with the fact that my organization is using a Commercial Azure tenant while the Office 365 tenant is GCC. Are you setup the same way or is everything GCC? If not, then it could just be an issue with GCC in general and Microsoft needs to look further into this...

  • alsomat Profile Picture
    6 on at

    Getting the same error, not sure if you have found a fix to it.

  • ThinkHaven Profile Picture
    5 on at

    I had a ticket open with Microsoft for a few months and they finally told me they believe the test functionality is broken in the configuration window of custom connectors in GCC tenants. Sure enough, when I added the connector to my Flow and ran it there it worked as expected. May want to just ignore the test tab for now and see if it works.

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 221 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 188 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 120

Last 30 days Overall leaderboard