0

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

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

我尝试这样做:

User createdUser = graphClient.Users.Request().AddAsync(new User 
{ 
    AccountEnabled = true, 
    DisplayName = "TestUser", 
    PasswordProfile = new PasswordProfile 
    { 
     ForceChangePasswordNextSignIn = false, 
     Password = "[email protected]" 
    }, 
    UserPrincipalName = "[email protected]", 
    MailNickname = "[email protected]", 
}).Result; 

,但它只是返回的ServiceException: Code: InternalServerError Message: The given key was not present in the dictionary.

Microsoft.Azure.ActiveDirectory.GraphClient一个例外,但这个没有被弃用?很多“旧”示例提到:“建议新项目使用Microsoft.Graph SDK”或其他语言,在其顶部。

回答

相关问题