Azure Enterprise App Registration - Certificate Based Authentication with JWT Assertion

Viewed 44

Referred Azure Article URL : https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-certificate-credentials

Problem statement : Followed steps as per the above mentioned article, but getting error like as below

Postman Request

Payload

Method : POST
URL : https://login.microsoftonline.com/{tenantId}/oauth2/token

x-www-form-urlencoded :

client_assertion_type : urn:ietf:params:oauth:client-assertion-type:jwt-bearer
client_assertion : { JWT Token }
tenant    : XXXXXXXXXXXXXXXXXXXXXXXXXXX
client_id : XXXXXXXXXXXXXXXXXXXXXXXXXXX
grant_type : client_credentials

Postman Response

{
    "error": "invalid_client",
    "error_description": "AADSTS700027: Client assertion contains an invalid signature. [Reason - The provided signature value did not match the expected signature value., Thumbprint of key used by client: **'Thumbprint-Certificate-ID'**, **Found key 'Start=01/03/2022 05:06:02, End=01/03/2023 05:26:02',** Please visit the Azure Portal, Graph Explorer or directly use MS Graph to see configured keys for app Id 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'. Review the documentation at https://docs.microsoft.com/en-us/graph/deployments to determine the corresponding service endpoint and https://docs.microsoft.com/en-us/graph/api/application-get?view=graph-rest-1.0&tabs=http to build a query request URL, such as 'https://graph.microsoft.com/beta/applications/XXXXXXXXXXXXXXXXXXX'].\r\nTrace ID: 300527eb-a871-4e6f-8f5b-031ec6940902\r\nCorrelation ID: 6364e88b-3717-48cd-abcf-df7c971d1fc9\r\nTimestamp: 2022-01-05 05:36:41Z",
    "error_codes": [
        700027
    ],
    "timestamp": "2022-01-05 05:36:41Z",
    "trace_id": "300527eb-a871-4e6f-8f5b-031ec6940902",
    "correlation_id": "6364e88b-3717-48cd-abcf-df7c971d1fc9",
    "error_uri": "https://login.microsoftonline.com/error?code=700027"
}
0 Answers
Related