question

MuhammadIzzuanAriffin-2621 avatar image
0 Votes"
MuhammadIzzuanAriffin-2621 asked KalyanChanumolu-MSFT commented

The reply URL specified in the request does not match the reply URLs configured for the application

Hi, I'm trying to currently test locally using Microsoft Graph Login to see if I am able to access my web app, but it seems that after inputting the same reply URL. it still returns the same error.

Attached is the screengrab
90601-image.png




Request Id: 43db9ea8-8fce-4bc4-9e8c-96f653334500
Correlation Id: 7c2d6c14-93a4-4570-aaca-d4450b275756
Timestamp: 2021-04-23T04:05:12Z
Message: AADSTS50011: The reply URL specified in the request does not match the reply URLs configured for the application: '10a44433-fddc-4655-8735-3ce5cfefcb8b'.

azure-active-directoryazure-ad-authentication
image.png (13.3 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

KalyanChanumolu-MSFT avatar image
1 Vote"
KalyanChanumolu-MSFT answered

@MuhammadIzzuanAriffin-2621 I would recommend creating a new thread for different issues so that more community members can provide their views.

State could be any random string that you can generate, it will be returned in the token response so you can use it to check for cross-site request forgery attacks.
You can include it in the request as shown below.

 https://login.microsoftonline.com/{tenant}/oauth2/v2.0/authorize?
 client_id=6731de76-14a6-49ae-97bc-6eba6914391e
 &response_type=code
 &redirect_uri=http%3A%2F%2Flocalhost%2Fmyapp%2F
 &response_mode=query
 &scope=https%3A%2F%2Fgraph.microsoft.com%2Fmail.read%20api%3A%2F%2F
 &state=12345
 &code_challenge=YTFjNjI1OWYzMzA3MTI4ZDY2Njg5M2RkNmVjNDE5YmEyZGRhOGYyM2IzNjdmZWFhMTQ1ODg3NDcxY2Nl
 &code_challenge_method=S256

If an answer or comment is helpful, please "Accept answer" or "Up-Vote" which might help other community members reading this thread.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

KalyanChanumolu-MSFT avatar image
1 Vote"
KalyanChanumolu-MSFT answered KalyanChanumolu-MSFT commented

@MuhammadIzzuanAriffin-2621 Welcome to Microsoft Q&A Forums.
If you are running the application from your local machine, please make sure that the localhost URI with port number is added as a Redirect URI to the App Registration

Local development debug URI
90595-image.png

App Registration
90594-image.png

It could take some time for the changes made in AD to take effect.
Please let us know if you have further questions.


If an answer is helpful, please "Accept answer" or "Up-Vote" for the same which might be beneficial to other community members reading this thread.


image.png (2.4 KiB)
image.png (7.7 KiB)
· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi Kalyan,

Thank you for the reply. I've made the changes, is it normal to receive a ValueError at my callback function stating that there is a state mismatch?

90563-image.png


This is the Callback Function:
90585-image.png


0 Votes 0 ·
image.png (11.5 KiB)
image.png (26.4 KiB)
KalyanChanumolu-MSFT avatar image KalyanChanumolu-MSFT MuhammadIzzuanAriffin-2621 ·

@MuhammadIzzuanAriffin-2621 This is not normal. Do you get this only for the initial login?
I am not aware of the language SDK and MSAL client library version you are using.
Please update to the latest client library and try again.

0 Votes 0 ·

Hi,

Apologies for the late reply. I have managed to resolve that particular issue however another issue has popped up


![91062-image.png][1]



Currently I am using Python with Django Framework along with MSAL 1.11.0

0 Votes 0 ·
image.png (88.9 KiB)
Show more comments