I am currently creating an Azure B2C Application, to be used by our company site.
I followed the instructions on the following sites:
http s://docs.microsoft.com/en-us/azure/active-directory-b2c/active-directory-b2c-app-registration
http s://docs.microsoft.com/en-us/azure/active-directory-b2c/active-directory-b2c-reference-policies
Specifically, I did the following:
- Under "Applications", I Created a B2C Application, named "My B2C App"
- Generated a key. Noted this down as well as the Application ID
- Set the Reply Url to "https://mysite.test.com/login/"
- Under "Identify Providers", I selected "Microsoft", and used the Application ID and key in #2
- Under "Sign-in Policies", I created a new policy names "B2C_signin1".
- Set the Identify Provider to "Microsoft".
- Under "Application Claims" I selected "Display Name", "Email Address", "Given Name", "Identify Provider", "Surname", and "User's Object ID"
- Once saved, I select the Application "My B2C App", and select the "Reply URL" --> "https://mysite.test.com/login/", which is already there in the dropdown by default.
- I click on "Run now".
I get redirected temporarily to the generated URL below:
https /login.microsoftonline.com/mytenant.onmicrosoft.com/oauth2/v2.0/authorize?p=B2C_1_signin1&client_Id=&nonce=defaultNonce&redirect_uri=https%3A%2F%2Fmysite.test.com%2Flogin%2F&scope=openid&response_type=id_token&prompt=login
I then get the error:
https /login.live.com/err.srf?lc=34313#error=invalid_request&error_description=The+provided+value+for+the+input+parameter+'redirect_uri'+is+not+valid.+The+expected+value+is+'https //login.live.com/oauth20_desktop.srf'+or+a+URL+which+matches+the+redirect+URI+registered+for+this+client+application.&state=
Why am I getting this error when the Reply URL I set up in for my Application is the same as the one I used in the creation of my policy? Is the way I set up my B2C App is correct? Could this be a bug in B2C App creation?
I did follow the instructions in the links above to the letter.
Any assistance on this issue would be appreciated.