
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.