- Assign the role Service Bus Data Sender to the APIM managed identity, in the Service Bus
- In APIM, add the base URL of the service bus to the settings of the API
- In APIM, add a policy to the inbound element:
<authentication-managed-identity resource = "https://servicebus.azure.net" />
- In APIM, add another policy to the inbound element:
<rewrite-uri template="taskqueue/messages" />
- In the App Service, add a Microsoft authentication provider
- Select the option to automatically create an app registration
- For the allowed client application, provide the APIM application id from Entra ID
- For the allowed identity, provide the APIM object ID from Entra ID
- In APIM, add the base URL of the API to the settings of the API
- In APIM, add a policy to the inbound element:
<authentication-managed-identity resource = "2a38a484-f728-404a-a47a-539ca7e22fff" />
where the resource guid is the application (client) ID of the backend API