Pre-create B2C 用户并发送 "Reset Password flow"-电子邮件 pre-populated
Pre-create user in B2C and send "Reset Password flow"-email pre-populated
我正在使用 Graph Api 向 B2C 中的 pre-create 用户发送带有“重置密码”的电子邮件 -userflow URL as:
https://xxx.b2clogin.com/xxx.onmicrosoft.com/oauth2/v2.0/authorize?p=B2C_1_ResetPassword&client_id=xxx&nonce=defaultNonce&redirect_uri=https%3A%2F%2Fjwt.ms&scope=openid&response_type=code&prompt=login&code_challenge=xxx&login_hint=me@example.com
有没有办法pre-populate电子邮件地址字段,让用户不需要手动填写?我试过附加 login_hint
但它不起作用。
创建用户代码:
`var user = new User
{
DisplayName = displayName,
AccountEnabled = true,
UserType = "Member",
Identities = new List<ObjectIdentity>()
{
new ObjectIdentity
{
SignInType = "emailAddress",
Issuer = "xxx",
IssuerAssignedId = email
},
},
PasswordProfile = new PasswordProfile
{
Password = password,
ForceChangePasswordNextSignIn = false
},
PasswordPolicies = "DisablePasswordExpiration",
AdditionalData = customAttributes
};
await graphClient.Users
.Request()
.AddAsync(user);`
login_hint
用于签到,文档here. It doesn't work in the password reset policy, and you could feedback here.
在此流程中无法直接预填充电子邮件地址。你可以使用 custom policies to define technical profiles and user journeys. Try to see this similar issue.
我正在使用 Graph Api 向 B2C 中的 pre-create 用户发送带有“重置密码”的电子邮件 -userflow URL as:
https://xxx.b2clogin.com/xxx.onmicrosoft.com/oauth2/v2.0/authorize?p=B2C_1_ResetPassword&client_id=xxx&nonce=defaultNonce&redirect_uri=https%3A%2F%2Fjwt.ms&scope=openid&response_type=code&prompt=login&code_challenge=xxx&login_hint=me@example.com
有没有办法pre-populate电子邮件地址字段,让用户不需要手动填写?我试过附加 login_hint
但它不起作用。
创建用户代码:
`var user = new User
{
DisplayName = displayName,
AccountEnabled = true,
UserType = "Member",
Identities = new List<ObjectIdentity>()
{
new ObjectIdentity
{
SignInType = "emailAddress",
Issuer = "xxx",
IssuerAssignedId = email
},
},
PasswordProfile = new PasswordProfile
{
Password = password,
ForceChangePasswordNextSignIn = false
},
PasswordPolicies = "DisablePasswordExpiration",
AdditionalData = customAttributes
};
await graphClient.Users
.Request()
.AddAsync(user);`
login_hint
用于签到,文档here. It doesn't work in the password reset policy, and you could feedback here.
在此流程中无法直接预填充电子邮件地址。你可以使用 custom policies to define technical profiles and user journeys. Try to see this similar issue.