microsoft-authentication-library-for-dotnet icon indicating copy to clipboard operation
microsoft-authentication-library-for-dotnet copied to clipboard

[Bug] Log an error if ppl perform OBO over common or organizations

Open bgavrilMS opened this issue 1 year ago • 1 comments
trafficstars

Library version used

4.58

.NET version

all

Scenario

ConfidentialClient - web api (AcquireTokenOnBehalfOf)

Is this a new or an existing app?

None

Issue description and reproduction steps

We keep getting issues related OBO + guest users.

Correct pattern is:

  1. Extract tid claim from client assertion
  2. Use authority cloud/tid to perform OBO on

Actual (wrong) pattern used by many is to use cloud/common to perform OBO

Relevant code snippets

No response

Expected behavior

No response

Identity provider

Microsoft Entra ID (Work and School accounts and Personal Microsoft accounts)

Regression

No response

Solution and workarounds

Log.Error similar to the one we put in client_credentials

bgavrilMS avatar Feb 05 '24 14:02 bgavrilMS

As part of this we should also add a clear code snippet in our docs on how to do this:

Correct pattern is:

Extract tid claim from client assertion Use authority cloud/tid to perform OBO on

pmaytak avatar Feb 14 '24 21:02 pmaytak

As part of this we should also add a clear code snippet in our docs on how to do this:

Correct pattern is: Extract tid claim from client assertion Use authority cloud/tid to perform OBO on

Which client assertion are we referring to exactly? what we pass into WithClientAssertion or ClaimsPrincipal? I am trying to find a code snippet where this is happening.

@bgavrilMS

trwalke avatar Mar 06 '24 06:03 trwalke

Keeping issue open to track doc updates

trwalke avatar Mar 06 '24 08:03 trwalke

Were the docs updated?

pmaytak avatar Mar 21 '24 00:03 pmaytak

Closing - this was released in 4.60.0. Added an issue in the docs repo for the related updates: https://github.com/MicrosoftDocs/microsoft-authentication-library-dotnet/issues/393

pmaytak avatar Apr 09 '24 03:04 pmaytak