Skip to content

OAuth Authorization Code - Support client_id in request body as required by Azure AD #25

Open
@elsewhat

Description

@elsewhat

Testing restish client against an API using OAuth Authorization Code where the identity provider is Azure AD.
This authentication fails with the following message from Azure AD AADSTS900144: The request body must contain the following parameter: 'client_id'.

The following confguration is done for restish api configure <name>

? API auth type oauth-authorization-code
? Auth parameter client_id <client_id in Azure AD>
? Auth parameter authorize_url [? for help] https://login.windows.net/common/oauth2/authorize?resource=<resource id in Azure AD>
? Auth parameter token_url https://login.microsoftonline.com/common/oauth2/token

When executing a call, the browser is opened and Azure AD gives the error message AADSTS900144: The request body must contain the following parameter: 'client_id'.

The console output is

Open your browser to log in using the URL:
https://login.windows.net/common/oauth2/authorize?resource=<resource id>?response_type=code&code_challenge=<code_challenge>&code_challenge_method=S256&client_id=<client_id>&redirect_uri=http://localhost:8484/&scope=n

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions