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

[FEATURE REQ] Add support for AZURE_CLIENT_ID environment variable to ManagedIdentityCredential #10931

Closed
jongio opened this issue Apr 20, 2020 · 7 comments · Fixed by #12689
Closed
Labels
Azure.Identity Client This issue points to a problem in the data-plane of the library.
Milestone

Comments

@jongio
Copy link
Member

jongio commented Apr 20, 2020

Library or service name.
Azure Identity

Is your feature request related to a problem? Please describe.
Developers need to be able to specify which AZURE_CLIENT_ID Managed Identity Credential with an environment variable.

#8094
#9321

@kaerm kaerm added Azure.Identity Client This issue points to a problem in the data-plane of the library. labels Apr 20, 2020
@chlowell chlowell added this to the Backlog milestone Apr 28, 2020
@jongio
Copy link
Member Author

jongio commented May 2, 2020

Please follow up with @schaabs before implementing.

@ms-lolo
Copy link

ms-lolo commented Aug 12, 2020

Could I convince you not to force this environment variable to be used in DefaultAzureCredential? This is currently breaking our code because we pass in client_id but this no longer works. Machines can have more than one identity assigned to them so being able to pass a client id in when creating an instance of the identity classes is important.

Not sure if you'd prefer I file a ticket for this and I wasn't sure if this should be called a bug.

@jongio
Copy link
Member Author

jongio commented Aug 12, 2020

The logic should be if the user provides a client id, then that would take precedence over the environment variable. Are you saying that is not happening?

@ms-lolo
Copy link

ms-lolo commented Aug 12, 2020

That's correct. This line of code is hard-coding the client_id parameter without checking if it's in kwargs:

ManagedIdentityCredential(client_id=os.environ.get(EnvironmentVariables.AZURE_CLIENT_ID), **kwargs)

@jongio
Copy link
Member Author

jongio commented Aug 12, 2020

Thanks, Would you like to file an issue for this? (I can if you'd like)

@ms-lolo
Copy link

ms-lolo commented Aug 12, 2020

sure I can give it a shot

@jongio
Copy link
Member Author

jongio commented Aug 12, 2020

Sounds great. Thank you for doing that.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Azure.Identity Client This issue points to a problem in the data-plane of the library.
Projects
None yet
4 participants