Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Managed Identity - Update logs or docs to clarify MI correlation ID is different than MSALs #3908

Closed
1 of 7 tasks
gladjohn opened this issue Jan 17, 2023 · 0 comments · Fixed by #3938
Closed
1 of 7 tasks

Comments

@gladjohn
Copy link
Contributor

Which version of MSAL.NET are you using?
4.49.1

Platform
Net Core

What authentication flow has the issue?

  • Desktop / Mobile
    • Interactive
    • Integrated Windows Authentication
    • Username Password
    • Device code flow (browserless)
  • Web app
    • Authorization code
    • On-Behalf-Of
  • Daemon app
    • Service to Service calls

Other?

Is this a new or existing app?
Dev App

Repro

using Microsoft.Identity.Client;

IConfidentialClientApplication cca = ConfidentialClientApplicationBuilder.Create("00bedee1-0e09-4a8d-81a0-0679c5a64a83")
                .WithExperimentalFeatures()
                .WithDebugLoggingCallback(logLevel: LogLevel.Verbose, enablePiiLogging: true, withDefaultPlatformLoggingEnabled: true)
                .Build();

string? scope = "https://management.azure.com";

do
{
    Console.WriteLine($"Acquiring token with scope {scope}");
    try
    {
        var result = await cca.AcquireTokenForClient(new string[] { scope })
            .WithManagedIdentity().ExecuteAsync().ConfigureAwait(false);

        Console.WriteLine("Success");
        Console.ReadLine();
    }
    catch (MsalServiceException e)
    {
        Console.WriteLine(e.ErrorCode);
        Console.WriteLine(e.Message);
        Console.WriteLine(e.StackTrace);
        Console.ReadLine();
    }

    Console.WriteLine("Enter the scope to acquire token, 'q' to quit.");
    scope = Console.ReadLine();
} while (scope?.Equals("q", StringComparison.InvariantCultureIgnoreCase) is false);

Expected behavior
With logging enabled and if MSI endpoint errors out then the correlation ID is different than the one MSAL uses. Need clarity in the logs or updated MSAL docs for this behavior

Additional context / logs / screenshots / links to code
Came as part of MSI Presentation the team did

@gladjohn gladjohn added this to the 4.50.0 milestone Jan 21, 2023
@neha-bhargava neha-bhargava self-assigned this Feb 3, 2023
@neha-bhargava neha-bhargava moved this from Triage to In Progress in MSAL Customer Trust / QM Feb 3, 2023
@neha-bhargava neha-bhargava moved this from In Progress to Waiting for Code Review in MSAL Customer Trust / QM Feb 3, 2023
@github-project-automation github-project-automation bot moved this from Waiting for Code Review to Fixed in MSAL Customer Trust / QM Feb 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants