繁体   English   中英

在Azure AD B2C中使用Microsoft.Graph SDK创建本地帐户

[英]Create local account using Microsoft.Graph SDK in Azure AD B2C

是否可以使用Microsoft.Graph SDK将本地帐户添加到Azure AD B2C?

Microsoft Graph API文档要求发送此数据 (与工作/学校帐户的成员不同)。

我尝试了这个:

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;

但是它只返回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.

Microsoft.Azure.ActiveDirectory.GraphClient但是是否不建议使用? 许多“旧的”示例都提到: “建议新项目使用Microsoft.Graph SDK” ,或在其顶部使用类似的词语。

目前..您不能。

这里这里

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM