英文:
How to read users using username in ADB2C?
问题
我如何使用用户名定义具有操作“读取”的技术配置文件?我尝试将输入类型设置为“signInNames.userName”、“signInNames.username”,但ADB2C页面直接抛出异常错误,没有ADB2C代码。
这是我定义的signInNames.userName声明类型。这应该受到责备吗?
<ClaimType Id="signInNames.userName">
<DisplayName>登录名</DisplayName>
<DataType>string</DataType>
<UserHelpText/>
<UserInputType>TextBox</UserInputType>
</ClaimType>
<TechnicalProfile Id="AAD-UserReadUsingUsername">
<Metadata>
<Item Key="Operation">Read</Item>
<Item Key="RaiseErrorIfClaimsPrincipalDoesNotExist">true</Item>
</Metadata>
<IncludeInSso>false</IncludeInSso>
<InputClaims>
<InputClaim ClaimTypeReferenceId="signInNames.userName" Required="true" />
</InputClaims>
<OutputClaims>
<!-- 可选声明 -->
<!-- <OutputClaim ClaimTypeReferenceId="signInNames.userName" /> -->
<OutputClaim ClaimTypeReferenceId="objectId" />
<OutputClaim ClaimTypeReferenceId="displayName" />
<OutputClaim ClaimTypeReferenceId="otherMails" />
<OutputClaim ClaimTypeReferenceId="givenName" />
<OutputClaim ClaimTypeReferenceId="surname" />
</OutputClaims>
<IncludeTechnicalProfile ReferenceId="AAD-Common" />
</TechnicalProfile>
英文:
How do I define a technical profile with operation "read" using username? I tried input type as "signInNames.userName", "signInNames.username" - but the adb2c page directly throwns an exception error without a ADB2C code.
This is how I defined the signInNames.userName claimtype. Is this to be blamed?
<ClaimType Id="signInNames.userName">
<DisplayName>Sign in name</DisplayName>
<DataType>string</DataType>
<UserHelpText/>
<UserInputType>TextBox</UserInputType>
</ClaimType>
<TechnicalProfile Id="AAD-UserReadUsingUsername">
<Metadata>
<Item Key="Operation">Read</Item>
<Item Key="RaiseErrorIfClaimsPrincipalDoesNotExist">true</Item>
</Metadata>
<IncludeInSso>false</IncludeInSso>
<InputClaims>
<InputClaim ClaimTypeReferenceId="signInNames.userName" Required="true" />
</InputClaims>
<OutputClaims>
<!-- Optional claims -->
<!-- <OutputClaim ClaimTypeReferenceId="signInNames.userName" /> -->
<OutputClaim ClaimTypeReferenceId="objectId" />
<OutputClaim ClaimTypeReferenceId="displayName" />
<OutputClaim ClaimTypeReferenceId="otherMails" />
<OutputClaim ClaimTypeReferenceId="givenName" />
<OutputClaim ClaimTypeReferenceId="surname" />
</OutputClaims>
<IncludeTechnicalProfile ReferenceId="AAD-Common" />
</TechnicalProfile>
答案1
得分: 0
请看这个示例。
收藏中还有其他与用户名相关的内容。
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论