Oauth integration : Create an oauth API for external clients

Vamshi_ch123
Tera Contributor

Hi All, 

 

We have to share oauth 2.O info to clients to integrate with servicenow along with client and client secret they were also asking for username and password, but when I try to create new it auto generates client id and client secret, but here we don't have an option to create username and password.

Do we need to create it in users table just like we do for basic authentication or we have any other option to create it from oauth application registry

 

Thank you

2 REPLIES 2

Community Alums
Not applicable

Hi @Vamshi_ch123 ,

You can follow the steps to create the Endpoints:

  1. On your production instance, navigate to All > System OAuth > Application Registry.
  2. Select New.
  3. Select Create an OAuth API endpoint for external clients.

Create OAuth API endpoints for external clients

 

For username and password:

You can create a user with Integration.user as username and set password.

Give that user 

1. rest_service

2. web_service_admin

3. rest_explorer role

and you can share these credentials to third party.

 

AndersBGS
Tera Patron
Tera Patron

Hi @Vamshi_ch123 ,

 

Why would they also request username and password if connection is made with Oauth? They shouldn't utilize username and password but instead only the refresh token. witch is made by you. The reason of doing this is, that you will not share username and password to keep it more secure. 

 

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.

 

Best regards

Anders

If my answer has helped with your question, please mark my answer as the accepted solution and give a thumbs up.

Best regards
Anders

Rising star 2024
MVP 2025
linkedIn: https://www.linkedin.com/in/andersskovbjerg/