[Bug] On behalf of supplier doesn't pass tenant id to silent supplier #881
Labels
needs attention
Automatically used when an issue is created through an issue template
untriaged
Automatically used when an issue is created through an issue template
Library version used
1.17.2
Java version
17.0.11
Scenario
ConfidentialClient - web api (AcquireTokenOnBehalfOf)
Is this a new or an existing app?
This is a new app or experiment
Issue description and reproduction steps
It seems that when the OBO supplier attempts to acquire the token silently from the cache it doesn't pass the Tenant ID in the SilentParameters which means that the token cannot be found in the cache.
I'm sending OnBehalfOfParameters with the Tenant ID:
This is all I'm seeing in the logs:
However if I dig a little deeper I can see that the cache miss is because the cached token realm doesn't match the authority tenant here. If I follow this back I can see that the authority tenant can come from the request parameters here. However it looks like this isn't happening because the
OnBehalfOfSupplier
doesn't add the tenant to theSilentParameters
here.Relevant code snippets
Expected behavior
The second request should be able to retrieve the token from the cache
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: