This issue will likely also exist for any other credential that uses the async AadClient to make token requests. Passing a tenant_id kwarg to the async ClientSecretCredential's get_token method raises an error because the kwarg makes its way into a call to AsyncPipeline.run and is unexpected.
To reproduce on Python 3.10 and azure-identity 1.7.0:
import asyncio
from azure.identity.aio import ClientSecretCredential
async def run_test():
credential = ClientSecretCredential(tenant_id="...", client_id="...", client_secret="...")
await credential.get_token("...", tenant_id="...")
asyncio.run(run_test())
This error can be resolved by popping the tenant_id kwarg on the line before this AsyncPipeline.run call, but tenant_id most likely still needs to be provided to AadClient.obtain_token_by_* methods because it's used by _get_client_secret_request.
This issue will likely also exist for any other credential that uses the async AadClient to make token requests. Passing a
tenant_idkwarg to the async ClientSecretCredential'sget_tokenmethod raises an error because the kwarg makes its way into a call toAsyncPipeline.runand is unexpected.To reproduce on Python 3.10 and
azure-identity1.7.0:This error can be resolved by popping the
tenant_idkwarg on the line before thisAsyncPipeline.runcall, buttenant_idmost likely still needs to be provided toAadClient.obtain_token_by_*methods because it's used by_get_client_secret_request.