question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Enhancement][L] Enable OBO for SP (ADAL to MSAL Migration Issue)

See original GitHub issue

Work

Which Version of MSAL are you using ? 4.13.0. I have described the issue in stack overflow. https://stackoverflow.microsoft.com/questions/198842. Generating OBO for SPN fails with “client info is null”

Platform net45

What authentication flow has the issue?

  • Web API
    • OBO for SPNs

Other? - please describe; OBO for users work fine but not for groups.

Is this a new or existing app? YES

Repro

  new UserAssertion(userBearerToken, "urn:ietf:params:oauth:grant-type:jwt-bearer"))
    .WithAuthority(aadAuthenticationAuthority)
    .ExecuteAsync();

==== Complete Stack Trace ===
Microsoft.Identity.Client.MsalClientException: client info is null
   at Microsoft.Identity.Client.Core.ClientInfo.CreateFromJson(String clientInfo)
   at Microsoft.Identity.Client.Internal.Requests.RequestBase.<CacheTokenResponseAndCreateAuthenticationResultAsync>d__17.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Identity.Client.Internal.Requests.OnBehalfOfRequest.<ExecuteAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Identity.Client.Internal.Requests.RequestBase.<RunAsync>d__14.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Identity.Client.ApiConfig.Executors.ConfidentialClientExecutor.<ExecuteAsync>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at Microsoft.Rdx.GatewayService.Engine.Authentication.AadApplicationAuthenticator.<AcquireTokenAsync>d__7.MoveNext() in E:\CXTLRepos\TSI\Backend\Source\Product\GatewayService\Engine\Authentication\AadApplicationAuthenticator.cs:line 57”

Expected behavior OBO should be generated

Actual behavior Exception. Response comes from token endpoint but fails during deserialization of response.

Possible Solution Fix in the requestBase.cs

Additional context/ Logs / Screenshots Add any other context about the problem here, such as logs and screebshots. Logging is described at https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/wiki/logging

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

0reactions
jmprieurcommented, Mar 17, 2021

If we want to test this, we can/should use PPE

daemon app calls web API call graph. The web API calls graph on behalf of the daemon

Read more comments on GitHub >

github_iconTop Results From Across the Web

4.29.0 Milestone
[Enhancement][L] Enable OBO for SP (ADAL to MSAL Migration Issue) Migration: ADAL to MSAL P1. #1845 by niruatweb was closed on Mar 30,...
Read more >
Migrate to the Microsoft Authentication Library (MSAL)
In this article ... If any of your applications use the Azure Active Directory Authentication Library (ADAL) for authentication and authorization ...
Read more >
Migrate confidential client applications to MSAL.NET
In this how-to guide you'll migrate a confidential client application from Azure Active Directory Authentication Library for .NET (ADAL.
Read more >
Migrating an ASP.NET core application to MSAL from ADAL
This month's in-depth topic : Migrating an ASP.NET core application to MSAL from ADAL – A developer journey.
Read more >
problems migrating from ADAL to MSAL (auth) in Asp.NET ...
I am working to migrate the project from the old ADAL libraries to MSAL. I've gone through the migration docs and configured the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found