Integration account is automatically failing after few hours
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hi all
I am facing issue with my Integration account It is Start giving error of unauthorized failed after few hours automatically with same credentials while calling API. I exported the same account from working instance to the instance in which I am facing this issue, but it worked fine for same time but again start throughout same error after few hours on the same day.
Any idea what exactly is the issue and to fix it?
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
35m ago
A. If you are using OAuth 2.0, your initial Access Token is only valid for a specific period.
Probable solution:
- Implement automatic token refresh logic using the Refresh Token.
- In the ServiceNow Application Registry, verify the Access Token Lifespan and Refresh Token Lifespan.
- Ensure the scope offline_access is included in your oauth profile , if you need to refresh tokens without user interaction.
B. If you are using Basic Authentication (username/password), the account might be getting locked out automatically.
Probable Cause: Another system or an old script might be trying to use expired credentials for the same account. After a few failed attempts, ServiceNow's security policy locks the user.
Probable Solution:
- Check the User Record and look at the Locked out checkbox and Failed login attempts field.
- Review System Logs and Transaction Logs for Login Failed entries for that specific user ID.
- If the user is an integration user, ensure Web Service Access Only is checked to prevent UI-based lockout triggers.
