0

I have an that runs on 1000+ of distributed servers using Azure AD for authentication. Each server is its own application instance with its own database, so they need to remain as separate websites. I need sample code.

The current Uris are:

https://myapp.server1.contoso.com/

https://myapp.server2.contoso.com/

https://myapp.server3.contoso.com/

etc.

how do I avoid the max redirect URI limit of 256?

Microsoft says to use a state parameter but this does not appear to work across subdomains. https://learn.microsoft.com/en-us/azure/active-directory/develop/reply-url

  • Those are some subdomains you need to setup and regarding the 256 limit, you can compress the data and use it as base64 string in a redirect uri. – Jamshaid K. Mar 11 '22 at 12:21

1 Answers1

0
  • Based on the Account type, limit changes as referenced here
  • Here what you can try is - Use 1 App Registration per Instance Or Use a Single reply URL.
  • State Parameter must contain the route to return the user to, where this parameter (base64 URL Encoded) is passed in the authentication request.
  • Decode the state parameter and redirect the user to where they started and in the original request, this state parameter is returned by the AD Tenant when token is received to the application.

Also, please refer to the below workaround

How to avoid Azure AD 256 redirect uri limit?

asp.net core - Azure AD App Registration limits Redirect URIs to 256 - Stack Overflow

Rukmini
  • 6,015
  • 2
  • 4
  • 14