azure-ml-workspace-creation icon indicating copy to clipboard operation
azure-ml-workspace-creation copied to clipboard

DefaultAzureCredential() in 'sdk/connect_to_workspace.py' requires an authenticated Azure session

Open Underdoge opened this issue 1 month ago • 0 comments

Hello,

When running the "create_workspace.py" script under the "sdk" folder, you get the following error:

azure.core.exceptions.ClientAuthenticationError: DefaultAzureCredential failed to retrieve a token from the included credentials. Attempted credentials: EnvironmentCredential: EnvironmentCredential authentication unavailable. Environment variables are not fully configured. Visit https://aka.ms/azsdk/python/identity/environmentcredential/troubleshoot to troubleshoot this issue. ManagedIdentityCredential: ManagedIdentityCredential authentication unavailable, no response from the IMDS endpoint. SharedTokenCacheCredential: SharedTokenCacheCredential authentication unavailable. No accounts were found in the cache. AzureCliCredential: Please run 'az login' to set up an account AzurePowerShellCredential: Failed to invoke PowerShell AzureDeveloperCliCredential: Azure Developer CLI could not be found. Please visit https://aka.ms/azure-dev for installation instructions and then,once installed, authenticate to your Azure account using 'azd auth login'. To mitigate this issue, please refer to the troubleshooting guidelines here at https://aka.ms/azsdk/python/identity/defaultazurecredential/troubleshoot.

This is because the DefaultAzureCredential class invoked in the 'connect_to_workspace.py' file requires the session to be authenticated with Azure first.

Steps to authenticate to Azure before running the 'create_workspace.py' file should be added to the 'instructions.md' file.

Underdoge avatar May 22 '24 19:05 Underdoge