Closed cjusko closed 1 month ago
That error message means the token request did not provide the client's credential.
Azure Identity's UsernamePasswordCredential
shall indeed add a new client_credential
parameter and wire it up to MSAL Python. This shall be a new feature request for Azure SDK.
Meanwhile, @cjusko you may consider directly using MSAL Python to support your such a scenario. This MSAL sample can work with or without client secret.
MSAL client type
Confidential
Problem Statement
I'm trying to authenticate via the UsernamePasswordCredential class, in order to then use it to access the msgraph-sdk-python however, when trying to get the token, I receive the following error:
Here's my code:
To Reproduce Steps to reproduce the behavior:
Expected behavior There would ideally be an option to provide the client secret. If there is already, then how am I able to do that?
Tried using ClientSecretCredential instead, but the claims response is always empty, resulting in an error. I assume that's because a login is required to authenticate properly, perhaps an incorrect assumption (see https://github.com/microsoftgraph/msgraph-sdk-python/issues/672 )
Advised to open issue here from my previous issue in https://github.com/Azure/azure-sdk-for-python/issues/35386
Proposed solution
No response