thunder-client-support icon indicating copy to clipboard operation
thunder-client-support copied to clipboard

when grant type is set as "Client Credential" , click "generate token" doesn't seem do anything.

Open jackchenwork opened this issue 3 years ago • 8 comments

Your Team Size Using TC: 1 Question:

I am trying to use Thunder Client extension in VSCode to test client App to Azure Function App authentication with oauth2.

I have two Azure App registrations created :

client app: d6904cde-d467-xxxx

Azure function App 's AAD authentication app id: 3abdb8e0-fe24-xxx

A App role is created for 3abdb8e0-fe24- and d6904cde- has requested application level api permission to 3abdb8e0 , and admin consent is done.

I am trying to use "Client Credential" grant type, but when I click "generate token", I only see a green "Saved Successfully" and nothing else happened, access token is not filled, doesn't look like token url is called at all. I am using Windows 10 machine.

Any suggestion where to troubleshoot?

image

jackchenwork avatar Aug 09 '23 15:08 jackchenwork

OK , I did a manual test with curl and figured out the problem.

Manual test provided me a error message " Client credential flows must have a scope value with /.default"

the scope need to be api://3abdb8e0-xxx/.default , I missed '/.default' part. Once added it, the token is generated properly. One issue I have is I don't see any error in Thunder Client when the scope is wrong.

jackchenwork avatar Aug 09 '23 15:08 jackchenwork

Hi @jackchenwork, please see output window for all the logs

rangav avatar Aug 09 '23 15:08 rangav

For what ever reason, there isn't anything in output window, when I have wrong and correct scope:

image

jackchenwork avatar Aug 09 '23 16:08 jackchenwork

Just want to confirm did you select Thunder Client filter in Output window, there is shortcut also in the menu for logs Screenshot 2023-08-09 at 18 41 39

rangav avatar Aug 09 '23 17:08 rangav

LOL thanks so much for the quick response. yeah the right side menu was in "terminal" by default and once I switched to thunder client, I see all the request and response !

jackchenwork avatar Aug 09 '23 17:08 jackchenwork

Apologize, should read the manual!

jackchenwork avatar Aug 09 '23 17:08 jackchenwork

Non problem, feel free to reach out if you have any other questions.

rangav avatar Aug 09 '23 19:08 rangav

Is this issue resolved?

Closing this issue feel free to reopen if needed

rangav avatar Aug 10 '23 19:08 rangav