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

Microsoft.Identity.Web.GraphServiceClient and Microsoft.Identity.Web.GraphServiceClientBeta share GraphServiceClientOptions #3221

Open
almostjulian opened this issue Jan 24, 2025 · 1 comment

Comments

@almostjulian
Copy link

almostjulian commented Jan 24, 2025

Microsoft.Identity.Web Library

Microsoft.Identity.Web.Graph

Microsoft.Identity.Web version

3.6.2

Web app

Not Applicable

Web API

Protected web APIs call downstream web APIs

Token cache serialization

In-memory caches

Description

Consider the following service registration:

// Startup.cs snippet

  services.AddMicrosoftGraph(options =>
  {
      options.RequestAppToken = true;
  });

  services.AddMicrosoftGraphBeta(options =>
  {
      options.RequestAppToken = true;
  });

Because the AddMicrosoftGraph* methods both register and use the same GraphServiceClientOptions configuration object, the project winds up with a Beta base URL for both clients, not just beta client.

Reproduction steps

  1. Register both AddMicrosoftGraph and MicrosoftGraphBeta with supplied options
  2. Use GraphServiceClient, call should go to beta endpoint.

Error message

No response

Id Web logs

No response

Relevant code snippets

Regression

No response

Expected behavior

1.0 and Beta clients should reach their respective endpoitns.

@almostjulian
Copy link
Author

Bumping this to make sure this is reproducible on your end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants