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.

There is no way to set the DisplayName for the OpenIdConnect provider

See original GitHub issue

Which version of Microsoft Identity Web are you using? 1.3.0

Where is the issue?

  • Other (please describe)

It’s not possible to set the display name since the call to AddOpenIdConnect is all done internally here https://github.com/AzureAD/microsoft-identity-web/blob/c75ea22dd4cf99ff6fc30c805d3d0cffcbc76879/src/Microsoft.Identity.Web/WebAppExtensions/MicrosoftIdentityWebAppAuthenticationBuilderExtensions.cs#L254 which doesn’t pass in a display name and a display name is not configurable by AuthenticationSchemeOptions

Is this a new or an existing app? c. This is a new app or an experiment.

Expected behavior There should be a parameter in AddMicrosoftIdentityWebApp to supply a DisplayName

Actual behavior There is not an option to do this

Issue Analytics

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

github_iconTop GitHub Comments

7reactions
apondmancommented, Feb 15, 2021

there is a workaround you can use right now until the displayName parameter is more easily available:

services.PostConfigure<AuthenticationOptions>(options =>
          {
              foreach (var scheme in options.Schemes)
              {
                  if (scheme.Name == OpenIdConnectDefaults.AuthenticationScheme)
                  {
                      scheme.DisplayName = "My Desired Display Name";
                  }
              }
          });

or register the scheme with a different name:

.AddMicrosoftIdentityWebApp(section, "MyCustomAuthScheme");

and replace the line in the first code snippet above with:

if (scheme.Name == "MyCustomAuthScheme")
1reaction
jennyf19commented, Aug 19, 2021

Included in 1.16 release

Read more comments on GitHub >

github_iconTop Results From Across the Web

openIdConnectIdentityProvider resource type
Represents OpenIDConnect identity providers in an Azure Active Directory ... There is no way to retrieve only the OpenID Connect identity ...
Read more >
Azure AD as an OpenID Connect Provider for ...
Signin/signup flow would automatically create the user object in the B2C tenant if it is missing. Sounds like the scenario might not be...
Read more >
Configuring an OpenID Connect identity provider
Configuring identity providers using the web console​​ Configure your identity provider (IDP) through the web console instead of the CLI. You must be...
Read more >
Configuring OpenID Connect as an authentication provider ...
Get that address from the relying party tab - it is unique to the connection: Once you have entered the client ID and...
Read more >
OpenID providers
Step 2: Configure OpenProject​​ Now, head over to OpenProject > Administration > OpenID providers. Click on “New OpenID provider”, select the Azure type,...
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