Ankur Bawiskar
Tera Patron

@balaji_prusty1 

401 means authentication issue.

Did you check that?

Post that check please see if your script fails and add logs to debug further.

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

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