【发布时间】:2021-01-30 15:00:15
【问题描述】:
当一个用户被创建或登录时,一个函数被调用。然后,该函数将触发 Logic App。逻辑应用需要向新添加的用户发送电子邮件。
这是捕获来自 B2C 的输入的模型。
public class InputClaimsDto
{
public string oid { get; set; }
public string firstName { get; set; }
public string lastName { get; set; }
public string email { get; set; }
}
除了电子邮件之外的所有字段都被填充。
这是完整的技术简介。
<!-- Custom Restful service -->
<TechnicalProfile Id="REST-API-SignUp">
<InputClaims>
<InputClaim ClaimTypeReferenceId="objectid" PartnerClaimType="oid" />
<InputClaim ClaimTypeReferenceId="givenName" PartnerClaimType="firstName" />
<InputClaim ClaimTypeReferenceId="surname" PartnerClaimType="lastName" />
<!--I'm trying to return the email-->
<InputClaim ClaimTypeReferenceId="otherMails" PartnerClaimType="email" />
</InputClaims>
<OutputClaims>
//...
</OutputClaims>
</TechnicalProfile>
要退回电子邮件,我尝试了email、signInNames.emailAddress、otherMails,但没有成功。
如何返回电子邮件或任何其他数据。
感谢您的帮助。
编辑
在 TrustFrameworkBse.xml 中,email 定义为Email address that can be used to contact you.
<ClaimType Id="email">
<DisplayName>Email Address</DisplayName>
<DataType>string</DataType>
<DefaultPartnerClaimTypes>
<Protocol Name="OpenIdConnect" PartnerClaimType="email" />
</DefaultPartnerClaimTypes>
<UserHelpText>Email address that can be used to contact you.</UserHelpText>
<UserInputType>TextBox</UserInputType>
<Restriction>
<Pattern RegularExpression="^[a-zA-Z0-9.!#$%&'^_`{}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$" HelpText="Please enter a valid email address." />
</Restriction>
</ClaimType>
【问题讨论】:
标签: azure-functions azure-ad-b2c