Call dynamic tenent id in outbound rest message

tanz
Tera Expert

Hi,

 

I want to set different tenant id for lower and production environments in the out bound rest message

tanz_0-1718602133776.png

the same i have in the http method also

tanz_1-1718602216729.png

So I have got two tenant ids one for lower and one for prod , based on the property say instance_name, i want to generate the token through via scheduled job every 30 mins

 

https://microsofton.com/${tenant_id}/oauth2/token

 the tenant id should be dynamic, can someone help on how to achieve this.

 

2 REPLIES 2

MattiasJonsson
ServiceNow Employee
ServiceNow Employee

Have a look at connection and credential aliases. They're meant for this.

https://docs.servicenow.com/bundle/washingtondc-platform-security/page/product/credentials/task/conn...

 

If helpful or correct, please indicate so!

Yashsvi
Kilo Sage
This is the next lesson of series of REST Integration in ServiceNow In this lesson we will learn about Sending Dynamic Data with Outbound REST Message. You will learn: - How to create POST method in ServiceNow - How to send dynamic data in ServiceNow via REST message Subscribe to the channel and ...