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

时间:2017-08-14 14:24:52

标签: c# active-directory microsoft-graph azure-ad-b2c azure-ad-graph-api

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

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

我试过了:

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.

的例外

Microsoft.Azure.ActiveDirectory.GraphClient但是这个没有被弃用?很多" old"示例提及:"建议新项目使用Microsoft.Graph SDK" ,或者在其顶部使用单词。

1 个答案:

答案 0 :(得分:0)

目前..你不能。

请参阅herehere

相关问题