Skip to content

Commit 80321fa

Browse files
authored
{Core} Only pass data to MSAL as kwargs (#30062)
1 parent b7d9b30 commit 80321fa

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

src/azure-cli-core/azure/cli/core/auth/credential_adaptor.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,13 @@ def signed_session(self, session=None):
5757
def get_token(self, *scopes, **kwargs):
5858
logger.debug("CredentialAdaptor.get_token: scopes=%r, kwargs=%r", scopes, kwargs)
5959

60-
# SDK azure-keyvault-keys 4.5.0b5 passes tenant_id as kwargs, but we don't support tenant_id for now,
61-
# so discard it.
62-
kwargs.pop('tenant_id', None)
60+
# Discard unsupported kwargs: tenant_id, enable_cae
61+
filtered_kwargs = {}
62+
if 'data' in kwargs:
63+
filtered_kwargs['data'] = kwargs['data']
6364

6465
scopes = _normalize_scopes(scopes)
65-
token, _ = self._get_token(scopes, **kwargs)
66+
token, _ = self._get_token(scopes, **filtered_kwargs)
6667
return token
6768

6869
def get_auxiliary_tokens(self, *scopes, **kwargs):

0 commit comments

Comments
 (0)