Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
Exporting PDF via RESTMessageV2 API with basic authentication fails with the error "Method failed: (/xxxxxx.do) with code: 401 - Invalid username/password combo" - Support and Troubleshooting
  • >
  • Knowledge Base
  • >
  • Support and Troubleshooting (Knowledge Base)
  • >
  • Exporting PDF via RESTMessageV2 API with basic authentication fails with the error "Method failed: (/xxxxxx.do) with code: 401 - Invalid username/password combo"
KB0817951

Exporting PDF via RESTMessageV2 API with basic authentication fails with the error "Method failed: (/xxxxxx.do) with code: 401 - Invalid username/password combo"


1175 Views Last updated : Apr 8, 2024 public Copy Permalink
KB Summary by Now Assist

Issue

Exporting PDF via RESTMessageV2 API with a basic authentication fails with HTTP 401 error.

Below are steps to be followed:

  1. Go to rest message and select the associated REST message.
  2. Set the authentication type "Basic" and set the Basic Auth Profile with the name in "sys_auth_profile_basic" table.
  3. Click on "TEST" under the related list in the HTTP method such as POST under related link, click "Test".
  4. Test run fails with below error:

 

Method failed: (/xxxxxx.do) with code: 401 - Invalid username/password combo
 

Release

All releases.

Cause

This HTTP status 401 may have been caused by below reasons:

  • The Basic Auth record in "sys_auth_profile_basic" may not have the right username and password credentials 
  • The username may not be existing in the "sys_user" table
 

Resolution

To overcome this error ; the  value in the username field in the "sys_auth_profile_basic" which is associated with the REST message Basic Auth Profile should also be checked if the username is existing on the sys_user table. 

If not , please add the username to sys_user table with providing "web_service_admin" role to that username.  Below is the documentation to follow :

Configure a REST message with basic auth

Create a basic auth profile

 

The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.