簡體   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