Skip to main content
Nintex Community Menu Bar
Solved

Call a web service unsupported_grant_type

  • February 27, 2025
  • 5 replies
  • 54 views

Forum|alt.badge.img+5

In a Nintex Automation Cloud Workflow, I am trying to get a token with a “Call a web service”-action  with this endpoint:

https://login.microsoftonline.com/myTenantId/oauth2/v2.0/token

Request Type is HTTP Post

Request Headers are: Content-Type:application/x-www-form-urlencoded

Request content:

grant_type=client_credentials
client_id=myAppId
client_secret=myAppsecret
scope:https://myTenant.sharepoint.com/.default

 

I get this Response: {"error":"unsupported_grant_type","error_description":"AADSTS70003: The app requested an unsupported grant type

 

 

My App-Registration on Azure has Sites.Selected Permissions:

And the permission has been granted to a specific Site by Grant-PnPAzureADAppSitePermission

This App has a valid Client-Secret.

Public Clientflows are allowed.

 

Why do I get “unsupported grant type”?

What am I missing here?

Any help is appreciated, thanks!

 

 

Best answer by RonLevy

Hi ​@SimonMuntz,

 

the issue has been solved with the help of the Nintex-Development-Team. We have to add & between the parameters.

grant_type=client_credentials&client_id=...&client_secret=...&scope=https://tenant.sharepoint.com/.default

It is now working. Thanks for looking into it. - Have a nice day, Ronny

 

View original
Translate
Did this topic help you find an answer to your question?

SimonMuntz
Nintex Employee
Forum|alt.badge.img+22
  • Nintex Employee
  • February 27, 2025

Hi ​@RonLevy,

First, have you gotten this working outside of Nintex, like Postman, for instance?

The only thing that sticks out for me is that the scope parameter has a colon : instead of an equals = sign to specify the value.

Translate

Forum|alt.badge.img+5
  • Apprentice
  • March 6, 2025

Hi ​@SimonMuntz 

I get the same error when using = instead of : for scope.

 

But I get a token if I try it with postman:

 

{
    "token_type": "Bearer",
    "expires_in": "3599",
    "ext_expires_in": "3599",
    "expires_on": "1741274207",
    "not_before": "1741270307",
    "resource": "00000002-0000-0000-c000-000000000000",
    "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIs...
}

 

And in Postman, i am using this endpoint: oauth2/token whereas I use oauth2/v2.0/token in the nintex-Workflow. Even if I change the endpoint in Nintex to oauth2/token, I get the same error.

In Postman, changing the endpoint to oauth2/v2.0/token, I get a token.

 

I see success in our azure login protocolls for my Postman-request, but I don’t see any log when I try to get a Token within my Nintex-Workflow

So, there might be a policy in place? (I don’t see any in my Postman-request)

Or a Nintex-Bug?
Should I open a Case?

Translate

SimonMuntz
Nintex Employee
Forum|alt.badge.img+22
  • Nintex Employee
  • March 7, 2025

Hi ​@RonLevy,

Check that the “Request content” field has no white space around the input as this can cause problems.

Translate

Forum|alt.badge.img+5
  • Apprentice
  • March 7, 2025

Hi ​@SimonMuntz,

 

has no whitespace.

I opened a Case which has been routed to development. I will let you know...

Translate

Forum|alt.badge.img+5
  • Apprentice
  • March 11, 2025

Hi ​@SimonMuntz,

 

the issue has been solved with the help of the Nintex-Development-Team. We have to add & between the parameters.

grant_type=client_credentials&client_id=...&client_secret=...&scope=https://tenant.sharepoint.com/.default

It is now working. Thanks for looking into it. - Have a nice day, Ronny

 

Translate

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings