-
Notifications
You must be signed in to change notification settings - Fork 94
acquire_token_with_client_certificate with public cert failing #199
Comments
The working example for acquire_token_with_client_certificate() is here. There is also a guildeline on how to work with the certificate. Did you mean you use the public cerfiticate or the private certificate (i.e. PEM file) in acquire_token_with_client_certificate()? |
I have seen these examples, but they do not use public_certificate- I am trying to use SNI authentication. I actually figured the issue out by having the AAD team dig through their server logs (and will fix this error case not to be 500). The issue is that in the initial PR to enable SN+I you expected a .pem encoded file for the public cert: a2524d7#diff-760dc384a167c4436779638a03c78900 and since removed the code to strip the pem headers: 9b58f3c#diff-6a2d410b3bd6c0538c7cc3911fc048b9 Can you update the function document comments to at least specify what format the public_certificate needs to be, since I assumed that the format should be the same as for the certificate (private key) and expect other consumers would make the same mistake. |
For reference, this is part of my working code:
|
Thanks Shelley for bringing this to our attention!
|
@shgoldbe Thanks again for bringing this to our attention. In next release of ADAL Python, we will accept the pem file with or without those tag lines, so that you won't have to remove your previous workaround. That being said, next time you want to rework your script, you can try SNI in our MSAL Python too! |
providing a pem encoded public certificate for the parameter for authenticationcontext acquire_token_with_client_certificate fails to acquire token. Not providing a public_certificate succeeds. After following up with AAD team, it seems the request is malformed.
Is there a working example of this and/or can the library add verification of the contents of the public certificate aside from confirming that the headers are being constructed correctly?
The text was updated successfully, but these errors were encountered: