You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ConfidentialClient - service to service (AcquireTokenForClient)
Is this a new or an existing app?
The app is in production, and I have upgraded to a new version of MSAL
Issue description and reproduction steps
We are having a WCF service (in .Net Framework 4.8).
Its a OnPrem setup.
Our services tries to acquire token from AAD and invokes another endpoint (passing the token in the authorization header).
For acquiring token its using Microsoft.Identity.Client (4.65.0).
We are noticing that ~0.05% of our calls to web api is failing with Http 401 error.
On further debugging, we realized that randomly for some instance the AAD token fetched is of v1.0, and so the call is failing ahead.
For most of the requests correct version (v2.0) token is generated, but randomly for some requests its creating v1.0 token.
The version of the ID Token is always v2 (except for WAM desktop app scenarios) and you can rely on that. Id Tokens are not issued for service pricipals (AcquireTokenForCLient)
Important: clients should never parse access tokens. The access token format could change, for example a tenant admin can enable token encryption and in this case Entra ID will issue JWEs instead of JWTs.
If you have your own web api, we recommend that you always set it to accept v2 tokens in the app manifest by setting "accessTokenAcceptedVersion": 2,
Library version used
4.65.0
.NET version
.Net Framework 4.8
Scenario
ConfidentialClient - service to service (AcquireTokenForClient)
Is this a new or an existing app?
The app is in production, and I have upgraded to a new version of MSAL
Issue description and reproduction steps
We are having a WCF service (in .Net Framework 4.8).
Its a OnPrem setup.
Our services tries to acquire token from AAD and invokes another endpoint (passing the token in the authorization header).
For acquiring token its using Microsoft.Identity.Client (4.65.0).
We are noticing that ~0.05% of our calls to web api is failing with Http 401 error.
On further debugging, we realized that randomly for some instance the AAD token fetched is of v1.0, and so the call is failing ahead.
For most of the requests correct version (v2.0) token is generated, but randomly for some requests its creating v1.0 token.
Relevant code snippets
Expected behavior
No response
Identity provider
Microsoft Entra ID (Work and School accounts and Personal Microsoft accounts)
Regression
No response
Solution and workarounds
No response
The text was updated successfully, but these errors were encountered: