Skip to content

Conversation

@trwalke
Copy link
Member

@trwalke trwalke commented Jun 4, 2025

  • You've read the Contributor Guide and Code of Conduct.
  • You've included unit or integration tests for your change, where applicable.
  • You've included inline docs for your change, where applicable.
  • There's an open issue for the PR that you are making. If you'd like to propose a new feature or change, please open an issue to discuss the change or find an existing issue.

Description

Updates the DefaultAuthorizationHeaderProvider to update the AcquireTokenOptions.LongRunningWebApiSessionKey after the token is acquired so that the key can be used in the next OBO call.

Fixes #3382

@trwalke trwalke marked this pull request as ready for review June 4, 2025 00:50
@trwalke trwalke requested a review from a team as a code owner June 4, 2025 00:50
Copy link
Collaborator

@jmprieur jmprieur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@trwalke
Copy link
Member Author

trwalke commented Jun 11, 2025

Wouldn't it be better to use the new interface that Keegan created:

https://github.com/AzureAD/microsoft-identity-abstractions-for-dotnet/blob/main/src/Microsoft.Identity.Abstractions/DownstreamApi/IAuthorizationHeaderProvider_T.cs

this way we could return something?

I'm am not sure it is the best way to do it. The returning of the cache key also happens when using the ITokenAcquisition so I wouldn't want to limit the solution to only IAuthorizationHeaderProvider_T.

See https://github.com/AzureAD/microsoft-identity-web/wiki/get-token-in-event-handler#principle

Lets fix this for the customer since it is the currently released behavior and change the design in a follow up PR. I can create a work item.

This was referenced Nov 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Microsoft.IdentityWeb - Impossible to keep LR OBO session with auto generated key

6 participants