Azure B2C:默认显示名称 [英] Azure B2C: Default Display Name

查看:57
本文介绍了Azure B2C:默认显示名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的系统管理员希望能够搜索用户并通过其给定名称和姓氏来识别用户,我们在注册时都收集/要求这两个名称.

Our Sys Admins want to be able to search for users and identify them by their Given Name and Surname, both of which we are collecting/requiring when they sign up.

我们不允许用户在创建帐户时指定显示名称"值.

We are NOT allowing users to specify a "Display Name" value when they create an account.

管理门户使用显示名称"作为用户"窗格中显示的三列之一.

The management portal uses the "Display Name" as one of the three columns displayed in the "Users" pane.

对于系统管理员而言,能够在用户管理门户中查看为姓氏"和给定名称"提供的值将很有用,从而能够识别正确的帐户.

It would be useful for Systems Administrators to be able to see the values given for Surname and Given Name in the user management portal to be able to identify the correct account.

我确实知道我可以在其中输入关键字的过滤器/搜索,并且实际上可以找到名字或姓氏与之匹配的帐户,但是如果其名称未显示在用户名"中(已设置为电子邮件),很难确定是否匹配.

I do know that there is a filter/search that I can type keywords into, and it does in fact find accounts with first or last names matching those, but if their name does not show in the "User Name" (which has been set to be the email), it is difficult to be sure of a match.

当我们收到来自新帐户的连接时,我可以编写代码来使用图形API更新显示名称,但我宁愿不这样做.

I could write code to update the display name using the graph API when we receive a connection from a new account, but I'd rather not.

在查看已创建B2C帐户的用户列表时,是否可以将显示名称配置为使用给定名称" +姓氏"值?

Is it possible to configure the Display Name to use the "Given Name" + "Surname" values when viewing the list of users that have created B2C accounts?

或者,是否有可能将其他属性显示为列,或者显示为显示名称"呢?

Or perhaps, is it possible to show other attributes as columns as well as or instead of "Display Name"?

推荐答案

我将Azure B2C自定义策略用于注册过程,并且具有相同的要求-DisplayName = FirstName + LastName.我使用索赔转换来实现这一目标.

I use Azure B2C custom policy for signup process and had the same requirement - DisplayName = FirstName + LastName. I use claims transformation to achieve that.

<ClaimsTransformations>
  <ClaimsTransformation Id="CreateDisplayNameFromFirstNameAndLastName" TransformationMethod="FormatStringMultipleClaims">
    <InputClaims>
      <InputClaim ClaimTypeReferenceId="givenName" TransformationClaimType="claim1" />
      <InputClaim ClaimTypeReferenceId="surname" TransformationClaimType="claim2" />
    </InputClaims>
    <InputParameters>
      <InputParameter Id="stringFormat" DataType="string" Value="{0} {1}" />
    </InputParameters>
    <OutputClaims>
      <OutputClaim ClaimTypeReferenceId="displayName" TransformationClaimType="outputClaim" />
    </OutputClaims>
  </ClaimsTransformation>
</ClaimsTransformations>

这篇关于Azure B2C:默认显示名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆