Authentication failed: Unable to get authority configuration for
We use the Python SDK to upload / download to BLOB storage and automatically create pipelines. The authentication goes correct on ubuntu and macos laptops, but the same exact code, with the same credentials will fail on a windows machine. Searching for the error does not result in anything, we have no idea where to look or to search:
The error is:
ValueError: OIDC Discovery endpoint rejects our request.
And
azure.core.exceptions.ClientAuthenticationError: Authentication failed: Unable to get authority configuration for: https://login.microsoftonline.com/.... Authority would typically be in a format of https://login.microsoftonline.com/your_tenant_name
We have set our AZURE_CLIENT_ID, AZURE_CLIENT_SECRET and AZURE_TENANT_ID.
The code which calls these is:
def create_credentials():
credentials = ClientSecretCredential(
client_id=os.environ.get("AZURE_CLIENT_ID"),
client_secret=os.environ.get("AZURE_CLIENT_SECRET"),
tenant_id=os.environ.get("AZURE_TENANT_ID"),
)
return credentials
def create_adf_client():
credentials = create_credentials()
adf_client = DataFactoryManagementClient(credentials, os.environ.get("subscription_id"))
return adf_client
ls_azure_sql = AzureSqlDatabaseLinkedService(connection_string=conn_string)
adf_client = create_adf_client()
adf_client.linked_services.create_or_update(
os.environ.get("rg_name"),
os.environ.get("df_name"),
os.environ.get("ls_sql_name"),
ls_azure_sql,
)
What can be the cause of this and how can we solve it? Especially since the code runs fine on ubuntu and macos, but fails on windows.