400 Bad Request(The provided JWE contains a field that is not base64 compliant) while extracting the access token

47 views
Skip to first unread message

John Adams

unread,
Apr 30, 2024, 9:24:49 AMApr 30
to JMeter Forum
Hi All,

I'm working on Azure AD integrated application and I'm trying to get the access token. However I'm encountered with an issue ".

{"error":"invalid_grant","error_description":"AADB2C90090: The provided JWE contains a field that is not base64 compliant.\r\nCorrelation ID: 46a522ea-644e-40cb-9f27-7c6612d14cb7\r\nTimestamp: 2024-04-30 13:14:54Z\r\n"}"

Refer the attached screenshot of my HTTP request.jm.PNG
HTTP/1.1 400 Bad Request
Cache-Control: no-store, must-revalidate, no-cache
Content-Type: application/json; charset=utf-8
Set-Cookie: x-ms-cpim-trans=; domain=virtugdev.b2clogin.com; expires=Wed, 30-Apr-2014 13:14:54 GMT; path=/; SameSite=None; secure; HttpOnly
x-ms-gateway-requestid: 06cc9366-a019-4063-b5ce-86156dd1b12a
X-Frame-Options: DENY
Public: OPTIONS,TRACE,GET,HEAD,POST
Strict-Transport-Security: max-age=31536000; includeSubDomains
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Allow: OPTIONS
Allow: TRACE
Allow: GET
Allow: HEAD
Allow: POST
Date: Tue, 30 Apr 2024 13:14:54 GMT
Connection: close
Content-Length: 219


DT

unread,
Apr 30, 2024, 9:31:15 AMApr 30
to JMeter Forum
Most probably your correlation of ${code} parameter is not properly implemented, i.e. you're fetching an incomplete value from the redirect or it contains some extra characters.

Use Debug Sampler and View Results Tree listener combination to compare the value of ${code} variable with the code returned from the server and fix your Post-Processor accordingly so it would extract only the code, not more, not less.

John Adams

unread,
Apr 30, 2024, 10:14:40 AMApr 30
to JMeter Forum
No, it is same.
token.PNGtoken1.PNGtoken2.PNG

John Adams

unread,
May 1, 2024, 9:28:09 AMMay 1
to JMeter Forum
It is resolved. Thanks.
Reply all
Reply to author
Forward
0 new messages