File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -230,6 +230,7 @@ def get_authorization_request_url(
230230 response_type = "code" , # Can be "token" if you use Implicit Grant
231231 prompt = None ,
232232 nonce = None ,
233+ domain_hint = None , # type: Optional[str]
233234 ** kwargs ):
234235 """Constructs a URL for you to start a Authorization Code Grant.
235236
@@ -251,6 +252,12 @@ def get_authorization_request_url(
251252 :param nonce:
252253 A cryptographically random value used to mitigate replay attacks. See also
253254 `OIDC specs <https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest>`_.
255+ :param domain_hint:
256+ Can be one of "consumers" or "organizations" or your tenant domain "contoso.com".
257+ If included, it will skip the email-based discovery process that user goes
258+ through on the sign-in page, leading to a slightly more streamlined user experience.
259+ https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-auth-code-flow#request-an-authorization-code
260+ https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-oapx/86fb452d-e34a-494e-ac61-e526e263b6d8
254261 :return: The authorization url as a string.
255262 """
256263 """ # TBD: this would only be meaningful in a new acquire_token_interactive()
@@ -281,6 +288,7 @@ def get_authorization_request_url(
281288 prompt = prompt ,
282289 scope = decorate_scope (scopes , self .client_id ),
283290 nonce = nonce ,
291+ domain_hint = domain_hint ,
284292 )
285293
286294 def acquire_token_by_authorization_code (
You can’t perform that action at this time.
0 commit comments