azure-ad-b2c - 在 B2C 中预先创建用户并发送“重置密码流程”-预先填充的电子邮件
问题描述
我正在使用 Graph Api 在 B2C 中预先创建用户,然后发送带有“重置密码”-userflow URL 的电子邮件:
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
有没有办法预先填充电子邮件地址字段,因此用户不需要手动编写它?我试过追加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);`
解决方案
推荐阅读
- powerbi - 在 Power BI 中,如何根据使用 DAX 的度量返回的所有类别的最大值返回类别标签?
- r - 将变量分配给R中粘贴的列名称
- php - 即使没有请求,客人结帐也会创建帐户
- amazon-web-services - Curl 在机器上工作,但不在网络浏览器上
- javascript - 如何在最后将数组的元素组合到一个警告框中
- memory - 在不复制内存的情况下重复 pytorch 张量
- statistics - 这个归一化曲线是什么?常数 ^(常数 ^ 观察指数为 100)
- java - Java 数组与数组
- c - 让 GNU 缩进在 If 语句之后添加新的大括号
- eclipse - 从转到定义中排除 *.pyd 文件(使用 ctrl+单击)