Outbound Integration not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2025 09:42 AM
Hi Everyone,
I am working on Outbound Integration.
Using OAuth2.0
For Grant_type Password: I clicked on Get OAuth Token --> I have entered correct UserName & Password, got the Access token & Refresh Token.
when am clicking on test: Am receiving error "Invalid username/password combo".
Can anyone Help me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2025 05:21 AM
Hello, see this video and check what mistake you are doing
Integration between 2 ServiceNow instances | OAUTH 2.0 | use-case | GlideOAuthClient API | Chapter 6
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2025 07:22 AM - edited 06-12-2025 08:11 AM
Hello, i think the issue is either with token or user/pass, try this script for token
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2025 08:33 AM - edited 06-17-2025 08:39 AM
Hi @sainath3
What is your outbound triggering scenario?
- Create Application Registries
- Create Oauth entity profile for the same Application Registries
- Under Oauth profile or Registries add Oauth entity scop name and ouath scope(if already there than check the value either its matching with the end user or not).
- Based on the Grant type you need to check it.
Access Token vs. Test Credentials
- The "Get OAuth Token" step uses the credentials to get a token — if that worked, the credentials are likely correct.
- The "Test" button in the Outbound REST Message might be using different credentials or not using the token properly.
Verify REST Message Configuration
- Go to System Web Services > Outbound > REST Message.
- Open your message and check:
- Authentication type is set to OAuth 2.0.
- The correct OAuth Profile is selected.
- No conflicting Basic Auth headers are present.
Check the Token Scope
- Some APIs require specific scopes in the token.
- If the token lacks required scopes, the API may reject it with a misleading error like "Invalid username/password".
- In the header of HTTP method you can just pass the content type.
- Under The method related link you can click on the "Set HTTP log level" and select all.
- This is to check what data are you sending to the end url.
- You can open outbound http request from the system log and check.
- In BR the script syntax:
try {
var r = new sn_ws.RESTMessageV2('Rest message name', 'Method'); // provide your rest message name and the method type like POST
r.setEndpoint('your endpoint'); // set your end point
r.setRequestBody(JSON.stringify(body)); // which data do you want to send you can pass it
var response = r.execute();
//response.waitForResponse(5);
var responseBody = response.getBody();
var httpStatus = response.getStatusCode();
outputs.responsebody = responseBody;
} catch (ex) {
var message = ex.message;
}- please check with the bracket open and close.
- In the script no need to pass the access token again as in ServiceNow while calling the endpoint it will append it automatically.
- Now you can check it.
In the test run generally it will take your login credential from the system
Try Manual Test with Postman
- Use the same token in Postman to test the API call.
- If it works in Postman but not in ServiceNow, the issue is likely in how ServiceNow is sending the request.
Stay awesome,
Roshnee Dash
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2025 12:53 PM
Hi @sainath3
If you found my response helpful, please mark it as correct and close the thread so others can benefit from it too.
Stay awesome,
Roshnee Dash
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2025 05:28 AM
Hello @sainath3
Could you please check if your endpoint is correct? I faced a similar issue last time and discovered that the endpoint was slightly incorrect. Kindly cross-check it once I believe this might resolve your issue.
Thank You
