SGC-Azure - Authentication failed. The 'Authorization' header is missing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
Hi,
I'm trying to configure the Service Graph Connector for Azure. When I try to test the connection for the my SG-Azure Service Graph Connection I am getting "Error 401 - Authentication failed. The 'Authorization' header is missing."
I have confirmed all the following:
User.Read permission on the Microsoft Graph API, Data.Read permission on the Log Analytics API and RBAC assignments.
Not sure why the token isn't being passed or where I can get more details of what it is doing. Tried removing and starting from fresh but I was still getting the Authentication failed. The 'Authorization' header is missing error.
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
Hi @HetB ,
A 401 – "Authentication failed. The 'Authorization' header is missing." typically indicates that ServiceNow is not sending a Bearer access token, rather than an issue with Azure RBAC permissions.
Here are the most common causes to check:
- Validate the OAuth Profile
- Ensure the Azure Service Graph Connection is using the correct OAuth 2.0 profile.
- Verify the Client ID, Client Secret, Tenant ID, and token endpoint.
- Confirm you can successfully obtain an access token.
- Check the Credentials Alias
- Verify the Service Graph Connection is mapped to the correct Credential Alias.
- Ensure the alias points to the intended OAuth credential and not a basic authentication credential.
- Test Token Generation
- From the OAuth credential, try generating an access token manually.
- If no token is generated, the Authorization header will not be added to the request.
- Review System Logs
- Check System Logs → Outbound HTTP Requests or ECC Queue (if using a MID Server) to determine whether the
Authorization: Bearer <token>header is present. - Also review OAuth Logs for token acquisition failures.
- Check System Logs → Outbound HTTP Requests or ECC Queue (if using a MID Server) to determine whether the
- Verify Azure App Registration
- Confirm the application has the required API permissions and that Admin Consent has been granted.
- Ensure the client secret has not expired.
- Plugin/Version Compatibility
- Verify you're using the supported version of the Service Graph Connector for Microsoft Azure for your ServiceNow release, as earlier versions had authentication-related issues addressed in later updates.
If the outbound request contains no Authorization header, the issue is almost always that ServiceNow failed to obtain an OAuth access token before making the API call.
To narrow it down further, could you provide:
- Your ServiceNow release (Washington DC, Xanadu, Yokohama, etc.).
- Whether you're using OAuth 2.0 Client Credentials or another authentication method.
- Whether "Get Access Token" succeeds from the OAuth credential.
- Whether the connection is direct or through a MID Server.
If my response helped, please hit the 👍Thumb Icon and accept the solution so that it benefits future readers.
Regards,
Pratik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
Hi @pratikjagtap
Thank you for your help and the list of common causes to check.
ServiceNow release is Zurich patch 10
Yes using OAuth 2.0
When Get Access Token it is successful and says "OAuth Access token is available but will expire soon at ...."
It is direct HTTP(s) Connection type not through MID Server
Kind regards,
HetB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
@pratikjagtap
When I tested the connection action using the credentials setup via guided setup, the oauth flow shows "Success" but in the response header it shows:
Method failed: (/) with code: 401
{"error":{"code":"AuthenticationFailed","message":"Authentication failed. The 'Authorization' header is missing."}}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hey @HetB ,
A 401 – “The Authorization header is missing” usually indicates that the issue is occurring during the authentication/token exchange rather than with the Azure RBAC permissions themselves.
Since you've already verified the API permissions and RBAC assignments, I would check the following:
Verify that the Azure App Registration / Client ID and Secret or Certificate configured in ServiceNow are correct and haven't expired.
Confirm that the required API permissions have been admin-consented in Azure.
Make sure the ServiceNow Service Graph Connector for Azure connection is using the correct authentication profile/credential.
Check the System Logs in ServiceNow around the time of the connection test for more detailed authentication errors.
In Azure, check Entra ID → Monitoring → Sign-in logs for the application/service principal. This can help determine whether ServiceNow is actually reaching Azure and requesting a token.
If the Azure sign-in logs show no authentication attempt, the problem is likely on the ServiceNow credential/connection configuration side.
I would also verify the exact Service Graph Connector for Azure version you're using, because the authentication configuration can differ between releases.
If all the configuration is correct and you're still getting the missing Authorization header error, I'd recommend opening a ServiceNow Support case and providing the connection test timestamp and relevant system logs so they can trace the REST authentication request.