Method failed: (xxx) with code: 401 - Invalid username/password combo (Microsoft Partner Api)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-17-2018 06:35 AM
I'm configuring ServiceNow with the microsoft partner api zo I can manage the Microsoft CSP portal.
I set up a sandbox environment and configured the Api in the Application Registry and OAUTH Entity Profile with Grant Type Client Credentials.
Now I'm trying to configure a rest message.
When I ask for a OAUTH Token I receive it and it is authorised.
Now I configure the HTTP Method like this:
When I try to do a test run I receive an error message:
Method failed: (/v1/customers) with code: 401 - Invalid username/password combo
I've tried to change the authentication type to No Authorisation but the error is the same.
I've tried to find the answer in the Partner Center REST API reference | Microsoft Docs but cannot find the anser.
Can anyone help with a solution?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-17-2018 11:03 AM
Since you are testing using console (not script yet), are you passing all required HTTP Query parameters required? If yes, I would check what util you were using on uAuth profile. For 'Clicent Credentials' grant type use 'OAuthUtil' for oAuth API Script on the oAuth profile. Also check com.snc.platform.security.oauth.is.active to be true.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-18-2018 05:55 AM
I've checked the com.snc.platform.security.oauth.is.active property and this is True.
About the HTTP Query parameters, I think I must the followin in the header (see Get a list of customers | Microsoft Docs)
Authorization: Bearer <token>
The token value should be from the authentication type, but how can I add this in the HTTP Request
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2019 01:45 PM
Did you ever get this to work? I am facing the same issue as this screenshot's question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-09-2021 12:18 PM
Hello,
Did you get this work? I'm facing same issue.
Thanks