Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure.Identity (azure cli / homebrew) support on Mac OS #66

Open
DPapst opened this issue Jul 29, 2023 · 3 comments
Open

Azure.Identity (azure cli / homebrew) support on Mac OS #66

DPapst opened this issue Jul 29, 2023 · 3 comments

Comments

@DPapst
Copy link

DPapst commented Jul 29, 2023

When trying to use Azure.Identity it fails to use azure cli

Unhandled exception. Azure.Identity.CredentialUnavailableException: DefaultAzureCredential failed to retrieve a token from the included credentials. See the troubleshooting guide for more information. https://aka.ms/azsdk/net/identity/defaultazurecredential/troubleshoot

  • EnvironmentCredential authentication unavailable. Environment variables are not fully configured. See the troubleshooting guide for more information. https://aka.ms/azsdk/net/identity/environmentcredential/troubleshoot
  • WorkloadIdentityCredential authentication unavailable. The workload options are not fully configured. See the troubleshooting guide for more information. https://aka.ms/azsdk/net/identity/workloadidentitycredential/troubleshoot
  • ManagedIdentityCredential authentication unavailable. Multiple attempts failed to obtain a token from the managed identity endpoint.
  • Visual Studio Token provider can't be accessed at /Users//.IdentityService/AzureServiceAuth/tokenprovider.json
  • Azure CLI not installed
  • PowerShell is not installed.
  • Azure Developer CLI could not be found.

short fix include homebrew bin and sbin in PATH:
Environment.SetEnvironmentVariable("PATH", $"/opt/homebrew/bin:/opt/homebrew/sbin:{Environment.GetEnvironmentVariable("PATH")}");

Maybe add option to Settings to add Homebrew or Azure Cli folder path

@tareqimbasher
Copy link
Owner

Thanks for the report. If possible, can you attach a script file that I can use to reproduce the issue?

@DPapst
Copy link
Author

DPapst commented Jul 29, 2023

sure
Script 2.netpad.zip

@DPapst DPapst closed this as completed Jul 29, 2023
@DPapst
Copy link
Author

DPapst commented Jul 29, 2023

sry did not want to close

@DPapst DPapst reopened this Jul 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants