AbstractApplicationBuilder<T>.WithInstanceDiscoveryMetadata Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
WithInstanceDiscoveryMetadata(String) |
Allows developers to configure their own valid authorities. A json string similar to https://aka.ms/aad-instance-discovery should be provided. MSAL uses this information to:
|
WithInstanceDiscoveryMetadata(Uri) |
Lets an organization setup their own service to handle instance discovery, which enables better caching for microservice/service environments. A Uri that returns a response similar to https://aka.ms/aad-instance-discovery should be provided. MSAL uses this information to:
|
WithInstanceDiscoveryMetadata(String)
Allows developers to configure their own valid authorities. A json string similar to https://aka.ms/aad-instance-discovery should be provided. MSAL uses this information to:
- Call REST APIs on the environment specified in the preferred_network
- Identify an environment under which to save tokens and accounts in the cache
- Use the environment aliases to match tokens issued to other authorities
public T WithInstanceDiscoveryMetadata (string instanceDiscoveryJson);
member this.WithInstanceDiscoveryMetadata : string -> 'T
Public Function WithInstanceDiscoveryMetadata (instanceDiscoveryJson As String) As T
Parameters
- instanceDiscoveryJson
- String
Returns
Remarks
Developers take responsibility for authority validation if they use this method. Should not be used when the authority is not known in advance. Has no effect on ADFS or B2C authorities, only for AAD authorities
Applies to
WithInstanceDiscoveryMetadata(Uri)
Lets an organization setup their own service to handle instance discovery, which enables better caching for microservice/service environments. A Uri that returns a response similar to https://aka.ms/aad-instance-discovery should be provided. MSAL uses this information to:
- Call REST APIs on the environment specified in the preferred_network
- Identify an environment under which to save tokens and accounts in the cache
- Use the environment aliases to match tokens issued to other authorities
public T WithInstanceDiscoveryMetadata (Uri instanceDiscoveryUri);
member this.WithInstanceDiscoveryMetadata : Uri -> 'T
Public Function WithInstanceDiscoveryMetadata (instanceDiscoveryUri As Uri) As T
Parameters
- instanceDiscoveryUri
- Uri
Returns
Remarks
Developers take responsibility for authority validation if they use this method. Should not be used when the authority is not known in advance. Has no effect on ADFS or B2C authorities, only for AAD authorities