After setting Microsoft Azure AD Spoke, Access Token cannot be retrieved.


Description

You have configured Microsoft Azure AD Spoke for the integraitonHub (also applies to Microsoft Intune Spoke).  However, in Flow Designer while trying to set a connection for AzureAD you will see the error "Refresh or Access Tokens are not available".   You may also see the error: "HTTP Error 401 - Unauthorized"  at  URL http://<instance>.service-now.com/oauth_redirect.do&client_secret=d02d80...

If  debug properties for Oauth(*)  are set in the instance, then the following errors will show in the node log at the time that you try to add the connection:

*** WARNING *** failed to get access token from remote oauth server.
*** WARNING *** OAuthRedirectProcessor caught a OAuthRequestProblemException with message invalid_client, AADSTS7000215: Invalid client secret is provided.

(*) Debug Properties:
- com.snc.platform.security.oauth.debug = true
- glide.auth.debug.enabled = true

Release or Environment

Any currently supported release.

Cause

The client secret used in the ServiceNow OAuth configuration setup for Microsoft Azure AD Spoke does not match the client secret defined in Azure side.

Resolution

1. Check with your Microsoft Azure team, use the correct client secret Value (not the client secret ID) as shown in Azure to use in this integration (or generate a new one).

2. Transfer the correct value to the ServiceNow Oauth configuration for Microsoft Azure AD Spoke.


Once the secret was set to the correct value, the issue will be resolved.