OAuth2.0 - 'Get OAuth Token' Fails with Azure, 'scope' is missing.

Richard Hine
Tera Guru
Tera Guru

Hi,

I am integrating with some functionality within the Microsoft Graph API and have followed these steps to configure my lab environment for access:

https://docs.microsoft.com/en-us/microsoft-365/security/defender-endpoint/apis-intro?view=o365-world...

I have stored the application registration id (ClientID), Tenant ID and Secret.

I have then followed this KB on how to set the values for the application registration in ServiceNow https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0993701

If I then click 'Get OAuth Token' in the OAuth2.0 Credential record it fails with the following error:-

find_real_file.png

You will notice the highlight that 'scope' is missing from the credential request.

Referring to the Microsoft pages on OAuth https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-client-creds-grant-flow I can see that 'First Case: Access token request with shared secret' does require a parameter called scope.

Attached for reference is my application registration, Azure Application ID (Client ID) is covered by Red. Azure Tenant ID is covered by Orange and SN instance name is covered with green.

Has anyone experienced this issue before and worked out how to resolve it? I am concerned part of all of my set up is incorrect.

Any help would be gratefully received.

Thanks,

Richard

1 ACCEPTED SOLUTION

Richard Hine
Tera Guru
Tera Guru

Solved it, the OAuth Entity profile needed the OAuth Entity Profile Scope record created and added to it.

find_real_file.png

Will leave this here as it might help others...

Richard

 

View solution in original post

1 REPLY 1

Richard Hine
Tera Guru
Tera Guru

Solved it, the OAuth Entity profile needed the OAuth Entity Profile Scope record created and added to it.

find_real_file.png

Will leave this here as it might help others...

Richard