Search code examples
azure-active-directorypowerapps

Cannot find the response URL to properly register my PowerApps App on Azure AD


I'm trying to implement RBAC (Role-Based Access Control) on a project that uses PowerApps. I've followed the steps depicted here: https://powerapps.microsoft.com/en-us/blog/implementing-role-based-permission/

Those steps are for registering a custom connector inside Azure AD for PowerApps, which enables me to use the GraphAPI for developing RBAC. On the article, it says that I should copy the response URL that its shown on the error screen to the "Reponse URL" field of Azure AD App Registration. But I have no such thing. The error screen I get is this one, which has no Response URL: enter image description here

How can I find my Apps's response URL so I can properly configure the conector in Azure AD?


Solution

  • Problem solved. I was misreading the URL. The URL on the login screen was https://login.microsoftonline.com/common/oauth2/authorize?client_id=bb9f3ec5-c2ad-4ed4-a46b-4472838fe747&response_type=code&redirect_uri=https%3a%2f%2fbrazil-001.consent.azure-apim.net%2fredirect&resource=https%3a%2f%2fgraph.microsoft.com%2f&prompt=select_account&state=94054d67-5f50-47ce-919b-e450c965c0f8

    You have to inspect it really close and you may see what @Philippe said: Look at the redirect_uri field, but if you watch closely, you can see that after the ending (i.e: "apim.net") there's an encoded character (%2f) which represents a forward slash. After that, comes a string ('redirect') which completes the URL and made the connector work.

    So, long story short, get a fresh set of eyes when inspecting sketchy URL's