Hi,
I'd like to automate some tasks in Power BI Service. Unfortunately, there is only a simple connector for Power BI. It means I have to write my own custom connector or create some HTTP request by myself (https://docs.microsoft.com/en-us/rest/api/power-bi/). That's ok for me.
But the problem is: I've registered an app in Azure and got client ID and client secret. But if I want to create an HTTP request with Active Directory OAuth, there is a field I don't understand: audience. I wasn't able to find out what I should write in. Does anybody have an idea what the field is for and what should be there?
Thank you for every hint.
Hi @Nolock,
You can have a try with:
https://graph.microsoft.com
There has a blog about Graph call, maybe it could help you something:
Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @v-litu-msft,
thank you very much for your answer. Unfortunately, it didn't work 😞
In some resource they use a URI, sometimes a GUID like here. The definition from the link says: "The GUID for the target resource that you want to access, which is the client ID from the application identity for your web app or API app."
I've tried everything possible, nothing works 😞
In case someone is still stuck with this error. The Audience should be one of the below
'https://service.flow.microsoft.com/'
'https://management.core.windows.net/'
'https://management.azure.com/'
'https://service.powerapps.com/'
'https://service.kratosapps.com/'
'637fcc9f-4a9b-4aaa-8713-a2a3cfda1505'.
The Audience is the API which your custom authentication App has permissions on. To get this URL, navigate to Azure AD --> App Registration, then select your custom authentication App, and click on API Permissions. Hereafter, select API / Permissions name which should pop up the permission details along with the used API. For example, https://service.flow.microsoft.com/Approvals.Manage.All . In this case, the Audience is https://service.flow.microsoft.com/
In case someone is still stuck with this error. The Audience should be one of the below
'https://service.flow.microsoft.com/','https://management.core.windows.net/','https://management.azure.com/','https://service.powerapps.com/','https://service.kratosapps.com/','637fcc9f-4a9b-4aaa-8713-a2a3cfda1505'
The Audience is the API which your custom authentication App has permissions on. To get this URL, navigate to Azure AD --> App Registration, then select your custom authentication App, and click on API Permissions. Hereafter, select API / Permissions name which should pop up the permission details along with the used API. For example, https://service.flow.microsoft.com/Approvals.Manage.All. In this case, the Audience is https://service.flow.microsoft.com/
Updating this post. Easiest way to find your audience in 2021 is to go to:
AAD > App Registration > Select App > API Permissions > Click the Top level item of a permission (i.e. Microsoft Graph) > When the Library opens you should see the an HTTPS address below the Name label. This is your API audience.
Hm. I'm not able to get this to work:
- Registered app in AAD:
- Setup HTTP action accordingly
Results:
Any ideas on what I'm missing?
I have exactly same issue-Http request failed as there is an error getting AD OAuth token: 'AADSTS500011: The resource principal named "https://service.flow.microsoft.com" was not found in the tenant named swiftinit. This can happen if the
Did you managed to find a solutions?
Hello, I am also having trouble using the OAuth. I get the same error. Is there any solution on that?
I came across this topic while searching for the answer to what to put in the Audience field in the Authentication object. I found this works for the Power BI API. Note there is no trailing / character, which exists in the API permissions in the App Registration:
The solution is to make sure you added the api that you created in Azure to security group. That group also need to be allowed to use service principals and need to be added to environment as Member.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Announcing a new way to share your feedback with the Power Automate Team.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
4 | |
3 | |
2 | |
2 | |
2 |