diff --git a/src/azure-cli-core/azure/cli/core/auth/msal_credentials.py b/src/azure-cli-core/azure/cli/core/auth/msal_credentials.py index 17a7117545b..8c6dfd0daf3 100644 --- a/src/azure-cli-core/azure/cli/core/auth/msal_credentials.py +++ b/src/azure-cli-core/azure/cli/core/auth/msal_credentials.py @@ -57,13 +57,8 @@ def get_token(self, *scopes, claims=None, **kwargs): if claims: logger.warning('Acquiring new access token silently for tenant %s with claims challenge: %s', self._msal_app.authority.tenant, claims) - - msal_kwargs = {} - if 'data' in kwargs: - msal_kwargs['data'] = kwargs['data'] - - result = self._msal_app.acquire_token_silent_with_error( - list(scopes), self._account, claims_challenge=claims, **msal_kwargs) + result = self._msal_app.acquire_token_silent_with_error(list(scopes), self._account, claims_challenge=claims, + **kwargs) from azure.cli.core.azclierror import AuthenticationError try: @@ -87,7 +82,7 @@ def get_token(self, *scopes, claims=None, **kwargs): result = self._msal_app.acquire_token_interactive( list(scopes), login_hint=self._account['username'], port=8400 if self._msal_app.authority.is_adfs else None, - success_template=success_template, error_template=error_template, **msal_kwargs) + success_template=success_template, error_template=error_template, **kwargs) check_result(result) # For other scenarios like Storage Conditional Access MFA step-up, do not @@ -110,10 +105,6 @@ def __init__(self, client_id, client_credential, **kwargs): def get_token(self, *scopes, **kwargs): logger.debug("ServicePrincipalCredential.get_token: scopes=%r, kwargs=%r", scopes, kwargs) - msal_kwargs = {} - if 'data' in kwargs: - msal_kwargs['data'] = kwargs['data'] - - result = self._msal_app.acquire_token_for_client(list(scopes), **msal_kwargs) + result = self._msal_app.acquire_token_for_client(list(scopes), **kwargs) check_result(result) return build_sdk_access_token(result)