Oauth token request to Sharepoint
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-14-2018 12:01 AM
Hello,
I am trying to request a token from Sharepoint using Oauth 2.0. So I've setup in ServiceNow the Oauth application registry and the Outbound REST, but when I click the Get Ouath Token button, this is what i get back in the response Body: "The request body must contain the following parameter: 'resource' "
I suppose I should send the resource parameter in the Oauth script include I've attached to the application registry, but I'm not sure where exactly in the script to add it and how to send it for Sharepoint to recognize and accept it.
Does anyone have any ideas on this?
Thank you.
- Labels:
-
Integrations

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-14-2018 12:57 AM
Hi,
I think you have to add this in REST outbound message.
Just check once.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-14-2018 04:20 AM
Hi Ashutosh,
Thanks for the quick reply. I've tried that already, but in the outbound REST message you can only add headers, so it does not accept my resource parameter if i add it in there; the same error is returned.
josh.nerius, dave.slusher you guys had a hard time in the past with Oauth, too. Do you have any advice on this one?
Thank you,
Mihaela

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-14-2018 04:39 AM
Great.
Can you show me your code.
Thanx

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-14-2018 04:44 AM
Hi,
Meanwhile check this as well:
Thanks