Ask a Question

Add Client Credentials location to clientCredentials auth flow

RachelP
Occasional Visitor

Add Client Credentials location to clientCredentials auth flow

I am using `application` (`clientCredentials`) auth flow as follows:

securityDefinitions:
  oauth2:
    type: oauth2
    tokenUrl: https://login.microsoftonline.com/<subscription-id>/oauth2/v2.0/token
    flow: application
    scopes:
      https://graph.microsoft.com/.default: default scope

The problem is that AAD requires that the client id and client secret are in the request body, and Swagger places the credentials in the request header. There is no way to select "Request Body" option when using Client Credentials:

RachelP_0-1642005991265.png

When using `password` flow, for example, you do have the option to choose how Client Credentials should be passed:

RachelP_1-1642006038986.png

 

I need to use `application`/`clientCredentials` flow and sent the credentials in the request body. Are there any known workarounds or could a fix be considered?

 

Thanks!

0 REPLIES 0
cancel
Showing results for 
Search instead for 
Did you mean: