Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

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