[英]Create local account using Microsoft.Graph SDK in Azure AD B2C
Is it possible to add local account to Azure AD B2C using the Microsoft.Graph
SDK? 是否可以使用
Microsoft.Graph
SDK将本地帐户添加到Azure AD B2C?
The Microsoft Graph API documentation requires that this data is sent (distinct members from that of work/school account). Microsoft Graph API文档要求发送此数据 (与工作/学校帐户的成员不同)。
I tried this: 我尝试了这个:
User createdUser = graphClient.Users.Request().AddAsync(new User
{
AccountEnabled = true,
DisplayName = "TestUser",
PasswordProfile = new PasswordProfile
{
ForceChangePasswordNextSignIn = false,
Password = "Abcd@1234"
},
UserPrincipalName = "testuser@test.com",
MailNickname = "testuser@test.com",
}).Result;
But it just returns an exception of ServiceException: Code: InternalServerError Message: The given key was not present in the dictionary.
但是它只返回
ServiceException: Code: InternalServerError Message: The given key was not present in the dictionary.
的异常ServiceException: Code: InternalServerError Message: The given key was not present in the dictionary.
There is Microsoft.Azure.ActiveDirectory.GraphClient
but is this not being deprecated? 有
Microsoft.Azure.ActiveDirectory.GraphClient
但是是否不建议使用? A lot of the "old" samples mention: "It is recommended for new projects to use Microsoft.Graph SDK" , or words to that effect, at the top of them. 许多“旧的”示例都提到: “建议新项目使用Microsoft.Graph SDK” ,或在其顶部使用类似的词语。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.