Unable to retrieve OAuth access token using Azure Key vault scope with Client credentials grant type

Pavani Muddana 1 Reputation point
2020-09-21T12:23:58.517+00:00

I am trying to use Azure Key vault scope in my Oauth 2.0 request to retrieve the access token using Client credentials grant type from another cloud provider.(IBM Cloud)

From IBM cloud the request is been received to Azure Oauth endpoint in the below format

client_id=<clientID>&scope=https%3A%2F%2Fvault.azure.net%2F.default&client_secret=<Secret>&grant_type=client_credentials

Below is the request format I am trying to use while calling Azure OAuth endpoint
Endpoint: https://login.microsoftonline.com/<tenant>/oauth2/v2.0/token
Headers:
Content-Type:application/x-www-form-urlencoded
Body:
client_id=<clientID>
&scope=https%3A%2F%2Fvault.azure.net%2F.default
&client_secret=<clientSecret>
&grant_type=client_credentials

I am receiving continuously This error 404 Not found with empty response body.
26100-image.png

Azure Key Vault
Azure Key Vault
An Azure service that is used to manage and protect cryptographic keys and other secrets used by cloud apps and services.
1,093 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,295 questions
{count} votes

2 answers

Sort by: Most helpful
  1. soumi-MSFT 11,716 Reputation points Microsoft Employee
    2020-09-21T13:11:08.703+00:00

    @Pavani Muddana , Thank you for reaching out. I tried accessing the v2/token endpoint of the AAD to fetch an access-token and was able to successfully fetch the token from AAD.
    26164-getaccesstokenkeyvault.png

    Hope this helps.

    Do let us know if this helps and if there are any more queries around this, please do let us know so that we can help you further. Also, please do not forget to accept the response as Answer; if the above response helped in answering your query.

    2 people found this answer helpful.

  2. Pavani Muddana 1 Reputation point
    2020-09-21T12:38:58.843+00:00
    0 comments No comments