cancel
Showing results for 
Search instead for 
Did you mean: 

ERROR: The request body must contain the following parameter: 'resource'.

sp00ky
New Contributor

ERROR: The request body must contain the following parameter: 'resource'.

Hi!

 

I want to authenticate against SharePoint Online and got the following error:

Fri Feb 26 10:43:08 CET 2021:ERROR:Failed to create the authorization URL
Fri Feb 26 10:43:08 CET 2021:ERROR:org.apache.oltu.oauth2.common.exception.OAuthSystemException: OAuthProblemException{error='invalid_request', description='AADSTS900144: The request body must contain the following parameter: 'resource'.

 

How can I add the parameter "resource" to OAuth2.0 parameters in SoapUI? Resource must be the same like scope.

OAuth 2 Flow = Client Credentials Grant

Client Identification = [client id]@[tenant id]

Client Secret = [client secret]

Access Token URI: https://accounts.accesscontrol.windows.net/[tenant id]/tokens/OAuth/2

Scope: 00000003-0000-0ff1-ce00-000000000000/[tenant name]@[tenant id]

 


Cheers
sp00ky

4 REPLIES 4
richie
Community Hero

Re: ERROR: The request body must contain the following parameter: 'resource'.

Hey @sp00ky,

The error you have detailed indicates your request requires a payload and the payload is missing the resource parameter. The error is reported because your payload is missing a resource parameter, so youd need to update your request's MediaType (datatype/Content-Type header) to support including a payload 'application/x-www-form-urlencoded'

and your payload would look something like the following:

resource=someValue
&client_id=someValue
&client_secret=someValue
&grant_type=client%20credentials

Ta

Rich
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
sp00ky
New Contributor

Re: ERROR: The request body must contain the following parameter: 'resource'.

Hi!

Understood so far, but how I can add this parameter in SoapUI to the authentication profile?

Regards
sp00ky

 

sp00ky_0-1614581755012.png

 

richie
Community Hero

Re: ERROR: The request body must contain the following parameter: 'resource'.

Hey @sp00ky,

Sorry i lost your post and have only just seen it. Short answer is "i dont know". I didnt read your last post properly and made a false assumption that you had a payload. I suggest raising a support request with smartbear to determine the answer of how to supply the resource parameter if no one answers this post.
Im also interested in the answer so when smartbear do respond, would you mind updating this post with the answer?

Sorry i csnt be more help,
Cheers,

Rich
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
sp00ky
New Contributor

Re: ERROR: The request body must contain the following parameter: 'resource'.

@richie Sorry but where can I open a support ticket as a non paying user?

 

BR

sp00ky

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors