[@azure/identity] Uncaught Error: EnvironmentCredential is not supported in the browser.
See original GitHub issuePackage/Version: @azure/identity@1.2.1
Is your feature request related to a problem? Please describe.
When I attempt to use @azure/identity in the browser I get this error:
Uncaught Error: EnvironmentCredential is not supported in the browser.
Describe the solution you’d like I would like this use case to actually work. We inject env vars into the build using webpack. Its a convenient way to inject various bits in test scenarios. In our case we make a “fake” Azure Portal wrapper around our project that injects these variables into the page. Webpack will handle the injection for us, but it won’t work when this case is explicitly rejected by the identity SDK.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
environmentcredential is not supported in the browser while ...
I created Azure app service with , identity system assigned and created the managed identity. I am getting this error while accessing the ......
Read more >@azure/identity - NET
This library simplifies authentication against Azure Active Directory for Azure SDK libraries. It provides a set of TokenCredential implementations which can be ...
Read more >Azure Identity client library for JavaScript | Microsoft Learn
A long-term fix to this problem is in progress. In the meantime, consider authenticating via the Azure CLI. Authenticate the client in browsers....
Read more >node.js - Azure Identity Authentication DefaultAzureCredential ...
The reason you are running into AuthorizationFailed error is because it looks like you have not assigned any permissions (RBAC role) to your ......
Read more >azure-identity - PyPI
Interactive browser - If enabled, DefaultAzureCredential will interactively authenticate a user via the default browser. This is disabled by default.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think I’m fine with manually plumbing environment variables. It might be convenient for tests to have this auto-picked up but it feels like such a risky thing to enable/have built in support for. You really should think hard using env vars in the browser.
@southpolesteve For the specific scenario you mention, would you be willing to consider writing a custom TokenCredential that does what you want?