Search code examples
azuremicrosoft-graph-apipower-automateazure-app-configurationazure-cost-calculation

Azure Cost Management API - Looking to Connect the Usage API?


So I'm using Power Automate to connect the API for Azure Cost Management Usage Specifically this guy:

https://learn.microsoft.com/en-us/rest/api/consumption/usage-details/list?tabs=HTTP

However, Powerautoamte, though it has an ADAuth with Oauth2 option, requires something called an "Audience?" and really I have no idea what to put here.

I have indeed registered an app, gave it the user-impresonation permission, approved it for my domain, and generated a client/secret for that app. All I need is the "Audience"

enter image description here


Solution

  • The Audience is the API which your AAD app has permissions on.

    To find this URL, try to navigate to Azure AD and App Registration, then select your Application, and click on API Permissions.

    Select API / Permissions name which should popup the permission details along with the used API.

    For example my AAD app has Microsoft Graph permissions

    enter image description here

    If I select Microsoft Graph row or click on one of the permissions the popup shows details

    enter image description here

    enter image description here

    The URL https://graph.microsoft.com/ represents the Audience in my case.

    You are probably using Azure Service Management, so in your case the Audience will be https://management.azure.com/

    enter image description here