ApplicationOptions.RedirectUri Property

Definition

The redirect URI (also known as Reply URI or Reply URL), is the URI at which Azure AD will contact back the application with the tokens. This redirect URI needs to be registered in the app registration (https://aka.ms/msal-net-register-app). In MSAL.NET, IPublicClientApplication defines the following default RedirectUri values:

  • urn:ietf:wg:oauth:2.0:oob for desktop (.NET Framework and .NET Core) applications
  • msal{ClientId} for Xamarin iOS and Xamarin Android without broker (as this will be used by the system web browser by default on these platforms to call back the application)
These default URIs could change in the future.

For Web Apps and Web APIs, the redirect URI can be the URL of the application

For daemon applications (confidential client applications using only the Client Credential flow that is calling AcquireTokenForClient), no reply URI is needed.

public string RedirectUri { get; set; }
member this.RedirectUri : string with get, set
Public Property RedirectUri As String

Property Value

Remarks

This is especially important when you deploy an application that you have initially tested locally;

         you then need to add the reply URL of the deployed application in the application registration portal

Applies to