Business Rule for OAuth 2.0 Authentication

Amit83
Tera Contributor

Hi Everyone,

 

I have configured REST Message and OAuth profile. Trying to create case in salesforce with this. So when I use Get OAuth Token and create case in servicenow, the BR helps in sending the data to salesforce and creating case there. But every time, I need to use the get oauth token.  

 

Can you help me with BR script to include in the existing create case script to get it automatically done?

 

Please refer the OAuth Profile-

 

Amit83_0-1690276319990.png

 

Thanks in advance!

 

@Ankur Bawiskar Pls

1 REPLY 1

Ankur Bawiskar
Tera Patron
Tera Patron

@Amit83 

you need to use script to generate the token and then use that in the actual endpoint

check these links

https://hi.service-now.com/kb_view.do?sysparm_article=KB0791131 

https://community.servicenow.com/community?id=community_question&sys_id=135f64cedb3214d0b1b102d5ca96... 

https://servicenowthink.wordpress.com/2020/05/15/how-to-authenticate-with-refresh_token-and-bearer-a... 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader