azure active directory – Cannot get AAD auth token in Logic Apps

My Azure Logic App attempts to make an authenticated HTTP call to another API, but it fails to get an access token.

  • api, Application ID 2222-2222-2222-2222: The app registration for the API.
  • logic, Application ID 3333-3333-3333-3333: An app registration for the Logic App.
  • In logic, I have created a client secret secretValue.
  • In logic, I have added Application permission access_as_application in api, and in api, I have granted this permission.

In Logic App, I use these values:

  • Authentication type: Active Directory OAuth
  • Authority: (blank)
  • Tenant: 1111-1111-1111-1111
  • Audience: 2222-2222-2222-2222
  • Client ID: 3333-3333-3333-3333
  • Credential Type: Secret
  • Secret: secretValue

But I get:

The audience '2222-2222-2222-2222' is invalid

Documentation is not clear on the format to use for Audience, so I have tried:

  • 2222-2222-2222-2222
  • api://2222-2222-2222-2222
  • api://2222-2222-2222-2222/.default
  • api://2222-2222-2222-2222/access_as_application

But none of them gives me a token.

Read more here: Source link