Skip to content
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.

Get error: AADSTS70002 - request body missing client_secret or client_assertion #57

Open
rochitsen opened this issue Nov 2, 2017 · 3 comments

Comments

@rochitsen
Copy link

rochitsen commented Nov 2, 2017

The following error comes up when following examples are run:

  1. User credential
  2. On behalf of user

When code is executed, user is asked to put username and password after which error comes up:

ERROR -- 4420c0e4-8101-4319-9d0e-8368a660f888: Parsed an ErrorResponse with error: invalid_client and error description: AADSTS70002: The request body must contain the following parameter: 'client_secret or client_assertion'.
Trace ID: 63d3ea78-fbeb-4b36-8b97-e208adee0c00
Correlation ID: 4420c0e4-8101-4319-9d0e-8368a660f888
Timestamp: 2017-11-02 05:55:23Z.

@omarqureshi
Copy link

+1 here - why is this required for the user credentials flow?

@omarqureshi
Copy link

Right, I've done a bit of digging around this - the summary of my investigation is that Azure for ActiveDirectory REQUIRES a client secret to be set.

The problem with this is that ROPG should not be sending client secrets.

ADAL supports sending (though undocumented) a client secret with the rest of the credentials, however, this library (correctly) does not do this.

It would be better to state the REAL problem in that AAD does not correctly suppport ROPG

References:

@omarqureshi
Copy link

In addition to the username and password sample not working, the on behalf of sample does not work as it also depends on using user credentials for the bearer token.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants