What are the extra query parameters allowed in the extraQueryParameters parameter of AcquireTokenAsync?
That method is for retrieving an authorization code, which as far as I know corresponds to this authorization flow, and the query parameters for it are documented there.
You can see how ADAL parses and uses the query parameters from the source on GitHub. If you attempt to override a query parameter that's already specified by the library (like redirectUri
) then it will throw an exception.
One example of a query parameter that you may be able to successfully override is domain_hint
Provides a hint about the tenant or domain that the user should use to sign in. The value of the domain_hint is a registered domain for the tenant. If the tenant is federated to an on-premises directory, AAD redirects to the specified tenant federation server.
Most of the other query parameters appear to already be in use by the library, and are either hard-coded by the library or are user specifiable elsewhere.
There's also some documentation for this parameter on the ADAL wiki
extraQueryParameters
(optional) enables application developers to provide extra parameters to the STS endpoints. This can be hints, or a kind of extension point for parameters not exposed directly through the API. This is a comma separated string of keys/values separated themselves by an ampersand:"key1=value1&key2=value2"
.- Note that ADAL.NET also checks if a specific environment variable exists (
ExtraQueryParameter
) and if it does it adds additional query parameter to each query to the STS endpoint.
Which might indicate that this is more useful when using a custom STS instead of AAD directly