Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

640
Views
Asp.net Core MVC application with Azure AD authentication. Unable to unprotect Message.State on browser back button

I have a ASP.NET Core 3.1 MVC application which is integrated with AZURE AD for authentication. The problem is that when redirecting between the pages it issues a request to a url something similar to :

https://login.microsoftonline.com/e3a291d3-8a20-4c35-8d08-38ffcafa479d/oauth2/authorize?client_id=86cda223-2296-46c3-a...

it automatically authenticated and next page loads perfectly fine. but if I press back button then it gets redirected back to this weird login url. And that's when it throws exception.

enter image description here

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

One of the workarounds that you can try is to add reply / redirect url to your app in Azure Ad as so, The Reply URL will deliver the authentication response, which will include a token if authentication is successful. Aslo try adding the PostLogoutRedirectURI in your appSettings where Azure AD will redirect the user-agent in an OAuth 2.0 request.

enter image description here

For Adding Reply URL you can navigate to Settings > Reply URLs and set the URL to the page where the user will be directed after logging in.

REFERENCE: Reply URLs vs PostLogoutRedirectURIs in Azure Active Directory (AAD) | by Marilee Turscak

Here is a similar Thread you can refer to Error code "Unable to unprotect the message.State" when redirecting

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!