AzureAD / rms-sdk-for-cpp

RMS SDK for C++
MIT License
29 stars 15 forks source link

Headless authorization failing #123

Closed ghost closed 8 months ago

ghost commented 8 years ago

I am trying to set up an app using non-interactive authentication. I can authorize against https://login.microsoftonline.com/tenant.onmicrosoft.com/oauth2/token using either client credentials or user credentials. However, upon trying to actually use the token which is returned I get a 401 response with the message "The authorization token is not well-formed".

Is this a case of me using the wrong authority or a problem with the token which is returned? https://jwt.io/ says that the token has an invalid signature.

raeitan commented 8 years ago

Hey, We currently do not support the general authorization endpoints (aka EVO), we have our own STS. When consuming, the callback will provide the authorization URL that should be used to generate the token. Support for the EVO authorization is available in the other platforms and is coming to the Linux one as well.

ghost commented 8 years ago

Hey, thanks for that. Does that STS support client credential authentication? Whenever I try to use the client_credentials grant type I get an "unsupported grant type" error.

Thanks

gaurav17281 commented 8 years ago

@jasonsgordon I'm trying something similar. Can you please share what are the various parameters that are being used. I'm looking for the information/documentation on the following -

Can you please help identifying this information?

Thanks,

ghost commented 8 years ago

I have been using: Resource -> api.aadrm.com Client_Secret -> You get this from your apps registration page in Azure Portal Authority -> Not sure what the correct one is, hence this issue.

Hope that helps.