Service Now API is not accepting azure AD access token
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2024 07:12 AM - edited 04-05-2024 03:18 AM
For SSO with Azure AD
I am using a package called ‘aad_oauth’ from pub.dev.
Url for the package : https://pub.dev/packages/aad_oauth
On the Azure portal created a ServiceNow Enterprise Application with SAML Single sign on.
Scopes Used to get access token : openid profile offline_access user.read email
I am successfully getting the access token from the Azure AD authentication but when passing the same token in the ServiceNow GET API as Bearer Token.
Get API : https://<instance_name>.service-now.com/api/now/table/incident/******************************************
Getting the below error.
{"error":{"message":"User Not Authenticated","detail":"Required to provide Auth information"},"status":"failure"}
401 Unauthrozied
Can anyone provide with any possible Solution?