[Bug] IPublicClientApplication.AcquireTokenInteractive.WithTenantIdFromAuthority
and IPublicClientApplication.AcquireTokenInteractive.WithTenantId
does nothing when using organizations
or consumers
for tenant
#4950
Labels
Library version used
4.65.0
.NET version
9.0.100-rc.1.24452.12
Scenario
PublicClient - desktop app
Is this a new or an existing app?
This is a new app or experiment
Issue description and reproduction steps
I am using the code in
Relevant code snippets
to change the tenant/account type when trying to get a token interactively:But the selector keeps showing Work/School and personal account options no matter what I supply - if instead I use
PublicClientApplicationBuilder.WithAuthority
and only then, the selector changes it's options - for example when setting tohttps://login.microsoftonline.com/consumers/
it only allows Personal Accounts to log inRelevant code snippets
Expected behavior
I expected it to work the same as when using
PublicClientApplicationBuilder.WithAuthority
- or at least be noted somewhere it does nothing.As to why I need this, I need it to constrict what accounts can be used - and preferably I want to prevent creating 3+
IPublicClientApplication
instances just for each case...Identity provider
Microsoft Entra ID (Work and School accounts and Personal Microsoft accounts)
Regression
No response
Solution and workarounds
Like mentioned before, my application only needs a filter/non-filter option, so this will ensue creating 3 instances
IPublicClientApplication
- one forconsumers
, one fororganizations
and one forcommon
when no filter is to applied.The text was updated successfully, but these errors were encountered: