从Microsoft Graph API添加备用邮件ID

问题描述 投票:2回答:2

我正在尝试从a.Net Core应用添加带有Microsoft Graph API的备用电子邮件。

Microsoft Graph中的user类未提供用于添加其他邮件ID的属性。

microsoft-graph azure-ad-graph-api
2个回答
4
投票

您可以使用Azure AD图将邮件ID添加到otherMails。这是更新此属性的示例:

PATCH: https://graph.windows.net/{tenant}/me?api-version=1.6
authorization: bearer {access_token}

{
"otherMails":["[email protected]"]
}

请参考下面的用户实体链接并更新用户REST:

Entity and complex type reference | Graph API reference

Update User


0
投票

这里是C#代码,用于检索备用电子邮件选择(u => new {

                u.DisplayName,

                u.Mail,

                u.UserPrincipalName,

                u.OtherMails

            })

            .GetAsync();  
© www.soinside.com 2019 - 2024. All rights reserved.