@@ -244,7 +244,13 @@ def _get_token_base(
244244 )
245245
246246 def authenticate (
247- self , * , scopes : Optional [Iterable [str ]] = None , claims : Optional [str ] = None , ** kwargs : Any
247+ self ,
248+ * ,
249+ scopes : Optional [Iterable [str ]] = None ,
250+ claims : Optional [str ] = None ,
251+ tenant_id : Optional [str ] = None ,
252+ enable_cae : bool = False ,
253+ ** kwargs : Any ,
248254 ) -> AuthenticationRecord :
249255 """Interactively authenticate a user. This method will always generate a challenge to the user.
250256
@@ -253,6 +259,10 @@ def authenticate(
253259 for these scopes.
254260 :keyword str claims: additional claims required in the token, such as those provided by
255261 :func:`AuthenticationRequiredError.claims`
262+ :keyword str tenant_id: optional tenant to include in the token request.
263+ :keyword bool enable_cae: indicates whether to enable Continuous Access Evaluation (CAE) for the requested
264+ token. Access tokens retrieved with CAE enabled will be cached separately from other tokens.
265+ Defaults to False.
256266 :return: An AuthenticationRecord containing the authenticated user's information.
257267 :rtype: ~azure.identity.AuthenticationRecord
258268 :raises ~azure.core.exceptions.ClientAuthenticationError: authentication failed. The error's ``message``
@@ -268,7 +278,9 @@ def authenticate(
268278
269279 scopes = _DEFAULT_AUTHENTICATE_SCOPES [self ._authority ]
270280
271- _ = self .get_token (* scopes , _allow_prompt = True , claims = claims , ** kwargs )
281+ _ = self .get_token (
282+ * scopes , _allow_prompt = True , claims = claims , tenant_id = tenant_id , enable_cae = enable_cae , ** kwargs
283+ )
272284 return self ._auth_record # type: ignore
273285
274286 @wrap_exceptions
0 commit comments