web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / PowerApps Portals, Azu...
Power Pages
Unanswered

PowerApps Portals, Azure B2C & Microsoft Identity - Invalid Request - 'redirect_uri' not valid

(0) ShareShare
ReportReport
Posted on by 2

We have been trying to configure Azure B2C using Microsoft as an Identity Provider. We have successfully managed to configure this within our Azure B2C tenant, and when we run the Sign In User Flow it executes as expected, driving the user through to Microsoft to authenticate.

 

However, when we bind this to our PowerApps Portal, we receive the following error:

 

“ Invalid request: The Provided Value for the input parameter ‘redirect_uri’ is not valid. The expected value is a URI which matches a redirect URI registered for this client application.”

 

We have followed numerous blogs (inc the ReadyXRM blog) and each of the Microsoft docs that references Azure B2C, but I have so far not been able to locate an article which deals with Microsoft Identity Provider specifically with the PowerApps portals configuration.

 

Our redirect URI is pointing to “domainname.powerappsportals.com/signin-B2C” and this seems to work fine for email auth in the portal.

 

I wonder if anyone has experience of setting this up and might have ideas of what could be causing this issue, as I am convinced it is Portal Configuration and the online documentation is extremely light.

Categories:
I have the same question (0)
  • v-xida-msft Profile Picture
    on at

    Hi @PeteLangdown ,

    Could you please share a bit more about your scenario?

    Do you register a app within your Azure Active Directory in Azure B2C tenant?

    Further, do you set the "Authentication/OpenIdConnect/[Federation-Name]/RedirectUri" setting within your PowerApps Portal?

     

    If you want to configure Azure B2C as Microsoft Identifier Provider within your PowerApps Portal, please check the following article:

    https://docs.microsoft.com/en-us/powerapps/maker/portals/configure/azure-ad-b2c

     

    Please check if you have configured the "Authentication/OpenIdConnect/[Federation-Name]/RedirectUri" setting within your PowerApps Portal with the following value:

    https://portaldomainname.powerappsportals.com/signin-[Federation-Name]

    Note: Please replace the Portal Url with your actual one, and replace the Federation-Name with the actual Federation-Name from your Azure B2C tenant.

     

    After that, you should also configure above Redirect Url for the application registered in your Azure B2C as below:

    3.JPG

     

    Please consider take a try with above solution, then check if the issue is solved.

     

    Best regards,

  • Pete Langdown Profile Picture
    2 on at

    Hi, 

     

    Thanks for the prompt response. We have followed these documents and have configured each of the areas you mention, with one key difference. 

     

    We have configured two redirects on the Application to the following:

     

    [1] https://[Federation Name].b2clogin.com/[Federation Name].onmicrosoft.com/oauth2/authresp

    [2] domainname.powerappsportals.com/signin-[Federation Name]

     

    If we do not have redirect [1] in place the user flow fails completely when running from Azure 'Run User Flow'.

     

    We have configured Authentication/OpenIdConnect/[Federation Name]/RedirectUri to the same value as specified by you and by the documents, but with no luck.  If this is changed, then it also seems that the User Flow will not run from Azure User Flow.

     

    If the Application redirect is set to [2], as well as the Site Setting to the same value, it fails in both the Portal and in Azure.

  • v-xida-msft Profile Picture
    on at

    Hi @PeteLangdown ,

    Do you use the Azure 'Run User Flow' to get the access token for the user?

     

    There are some key points when you configuring Azure B2C with PowerApps Portal, please refer to the following blog:

    https://www.engineeredcode.com/blog/power-apps-portals-external-authentication-with-azure-ad-b2c

     

    Please consider check the following video resource for more details configuring Azure B2C with PowerApps Portal:

    https://www.youtube.com/watch?v=_Gf142b9Aq4

     

    Best regards,

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Pages

#1
Fubar Profile Picture

Fubar 89 Super User 2025 Season 2

#2
Jerry-IN Profile Picture

Jerry-IN 75

#3
sannavajjala87 Profile Picture

sannavajjala87 31

Last 30 days Overall leaderboard