You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
There is no way to set the DisplayName for the OpenIdConnect providerΒ #808
The display name (of the signed-in user, I'm assuming) is inferred from the claims which are in the IDToken. There is no need to specify it externally. What is your scenario? what are you trying to do?. In which case would you want to override a display name which is not in the claims?
To answer your question:
you have full control of your UI anyway. When you unfold one of the ASP.NET Core templates, the page displaying the name is Pages/Shared/_LoginPartial, which is in the code of your app (not in the framework / the library).
if you don't want to change the UI, the display comes from the options.TokenValidationParameters.NameClaimType
Hi there, what I am referring to by DisplayName is the display name of the provider.
The code is what I mentioned above with this call builder.AddOpenIdConnect. This method has an optional displayName parameter which must be set via this call as its not settable by any options configuration. This is the overload I'm referring to which sets "A display name for the authentication handler."
Shannon Deminick (@Shazwazza) @farshid3003
would it work if we predefined a better name like "Microsoft identity platform" ? or "Azure active directory" ? or do you need to provide your own label? (what would it be?)
Jean-Marc Prieur (@jmprieur) Since this lib can be used as boilerplate configuration for Azure B2C then the label could really be anything since B2C is a white label auth system that can be branded in any way.
Activity
Shazwazza commentedon Dec 4, 2020
I'm happy to send a PR to add this
jmprieur commentedon Dec 4, 2020
The display name (of the signed-in user, I'm assuming) is inferred from the claims which are in the IDToken. There is no need to specify it externally. What is your scenario? what are you trying to do?. In which case would you want to override a display name which is not in the claims?
To answer your question:
you have full control of your UI anyway. When you unfold one of the ASP.NET Core templates, the page displaying the name is Pages/Shared/_LoginPartial, which is in the code of your app (not in the framework / the library).
if you don't want to change the UI, the display comes from the
options.TokenValidationParameters.NameClaimTypemicrosoft-identity-web/src/Microsoft.Identity.Web/WebAppExtensions/MicrosoftIdentityWebAppAuthenticationBuilderExtensions.cs
Lines 272 to 279 in c75ea22
You can always override after calling AddMicrosoftIdentityWebApp
Shazwazza commentedon Dec 7, 2020
Hi there, what I am referring to by
DisplayNameis the display name of the provider.The code is what I mentioned above with this call
builder.AddOpenIdConnect. This method has an optionaldisplayNameparameter which must be set via this call as its not settable by any options configuration. This is the overload I'm referring to which sets "A display name for the authentication handler."jmprieur commentedon Dec 7, 2020
Thanks for the update, Shannon Deminick (@Shazwazza)
This makes sense.
farshidmirza commentedon Dec 8, 2020
I have this problem as well, we cannot set the provider display name
jmprieur commentedon Dec 8, 2020
Shannon Deminick (@Shazwazza) @farshid3003
would it work if we predefined a better name like "Microsoft identity platform" ? or "Azure active directory" ? or do you need to provide your own label? (what would it be?)
Shazwazza commentedon Dec 8, 2020
Jean-Marc Prieur (@jmprieur) Since this lib can be used as boilerplate configuration for Azure B2C then the label could really be anything since B2C is a white label auth system that can be branded in any way.
18 remaining items
jmprieur commentedon Jun 2, 2021
Chris Ross (@Tratcher) FYI we still need to do that.
jennyf19 commentedon Aug 4, 2021
I have a branch: https://github.com/AzureAD/microsoft-identity-web/tree/jennyf/displayName
with the changes to handle providing the DisplayName, if you want to try it out. Still a work in progress.
Shannon Deminick (@Shazwazza) Armand Pondman (@apondman) Jimmie Houts (@theyo) @farshid3003
jennyf19 commentedon Aug 19, 2021
Included in 1.16 release