@@ -376,7 +376,6 @@ def initiate_auth_code_flow(
376376 def get_authorization_request_url (
377377 self ,
378378 scopes , # type: list[str]
379- # additional_scope=None, # type: Optional[list]
380379 login_hint = None , # type: Optional[str]
381380 state = None , # Recommended by OAuth2 for CSRF protection
382381 redirect_uri = None ,
@@ -425,14 +424,6 @@ def get_authorization_request_url(
425424
426425 :return: The authorization url as a string.
427426 """
428- """ # TBD: this would only be meaningful in a new acquire_token_interactive()
429- :param additional_scope: Additional scope is a concept only in AAD.
430- It refers to other resources you might want to prompt to consent
431- for in the same interaction, but for which you won't get back a
432- token for in this particular operation.
433- (Under the hood, we simply merge scope and additional_scope before
434- sending them on the wire.)
435- """
436427 authority = kwargs .pop ("authority" , None ) # Historically we support this
437428 if authority :
438429 warnings .warn (
@@ -1007,6 +998,7 @@ def acquire_token_interactive(
1007998 claims_challenge = None ,
1008999 timeout = None ,
10091000 port = None ,
1001+ extra_scopes_to_consent = None ,
10101002 ** kwargs ):
10111003 """Acquire token interactively i.e. via a local browser.
10121004
@@ -1043,6 +1035,12 @@ def acquire_token_interactive(
10431035 By default we will use a system-allocated port.
10441036 (The rest of the redirect_uri is hard coded as ``http://localhost``.)
10451037
1038+ :param list extra_scopes_to_consent:
1039+ "Extra scopes to consent" is a concept only available in AAD.
1040+ It refers to other resources you might want to prompt to consent for,
1041+ in the same interaction, but for which you won't get back a
1042+ token for in this particular operation.
1043+
10461044 :return:
10471045 - A dict containing no "error" key,
10481046 and typically contains an "access_token" key,
@@ -1054,6 +1052,7 @@ def acquire_token_interactive(
10541052 self ._client_capabilities , claims_challenge )
10551053 return self .client .obtain_token_by_browser (
10561054 scope = decorate_scope (scopes , self .client_id ) if scopes else None ,
1055+ extra_scope_to_consent = extra_scopes_to_consent ,
10571056 redirect_uri = "http://localhost:{port}" .format (
10581057 # Hardcode the host, for now. AAD portal rejects 127.0.0.1 anyway
10591058 port = port or 0 ),
0 commit comments