Search code examples
azureazure-active-directoryazure-cdnpower-automate

Where to find Audience and Client id fields to use in Microsoft Flow's Azure REST API call?


I am trying to call a CDN Purge's Azure REST API url from Microsoft Flow.

  • I found HTTP - HTTP as the best action to use as Azure with HTTP sounds to be specialized on accessing resources not on (just) calling.
  • I created a Web app / API application in Azure Active Directory for this purpose.
  • The API calls need to be authenticated so I chose Active Directory OAuth.
  • I filled in the Tenant id into Tenant, chose Secret as Credential type and put a application's password (Keys) into the Secret field.

However, I am lost what to put into Audience and Client ID field.

I tried to search docs but did not find any relevant results. I presume one of those should be the App Id.

What to put into the Audience and Client ID fields and how to find the values?

Is there anything else required to do to make this working (like setting a permission to allow purging the CDN, updating manifests, assigning roles)?

PS: I am getting BadRequest. Http request failed as there is an error getting AD OAuth token: 'AADSTS50105: Application '<appId>' is not assigned to a role for the application '<appIdUri>'. in my most recent attempt.


Solution

  • The audience is the value of App ID URI that you registered (homepage below image)

    The Client Id is nothing but the Application ID

    enter image description here