Reputation: 866
Using the az cli, I can get an access token with the following commands
az login --username <email address> --password <my password>
az account get-access-token --resource https://ossrdbms-aad.database.windows.net
I understand that this is not recommended (using the username and password), but sometimes it's a reality. My question is, how do I replicate this functionality in .NET? The only option I see is the UsernamePasswordCredential.
But that requires the client ID of an App Registration. The az cli does not require that. I just want to have the user specify the username and password and have it retrieve a token. Any help would be greatly appreciated.
Upvotes: 0
Views: 38
Reputation: 58863
I'm pretty sure AZ CLI uses its own client ID for the request.
The endpoint in Entra ID requires a client ID.
Upvotes: 0