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

Error InvalidAuthenticationAudience when calling a Custom API from a Canvas App

(0) ShareShare
ReportReport
Posted on by

Hello, we are getting this error when calling a Custom API in our dev environment:

"response": {
          "error": {
            "code": "InvalidAuthenticationAudience",
            "message": "The received access token has been obtained from wrong audience or resource 'https://xxx.crm4.dynamics.com/'. It should exactly match (including forward slash) with one of the allowed audiences 'https://service.powerapps.com/','https://apps.powerapps.com','https://apps.powerapps.com/','https://apihub.azure.com','https://api.powerplatform.com'."
          }
        }
 
"_serviceType": "connector",
      "_suggestedErrorMessage": {
        "message": "One or more of your connections may not be authenticated. Please restart the app to fix this."
      },
      "_diagnosticMessage": "The received access token has been obtained from wrong audience or resource 'https://xxx.crm4.dynamics.com/'. It should exactly match (including forward slash) with one of the allowed audiences 'https://service.powerapps.com/','https://apps.powerapps.com','https://apps.powerapps.com/','https://apihub.azure.com','https://api.powerplatform.com'."
    }
 

The Power FX code is:

Environment.book_api(
            {
                qId: Quote.Quote,
                qoId: Option.'Quote Product',
                bill: varBill
            }
        );
 

Our environment is in North Europe, which should not have an impact.

Categories:
I have the same question (1)
  • developerAJ Profile Picture
    4,763 on at
    please provide a screenshot of auth tab from custom connector window

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 538

#2
WarrenBelz Profile Picture

WarrenBelz 420 Most Valuable Professional

#3
Haque Profile Picture

Haque 305

Last 30 days Overall leaderboard