启用邮件的组上的图形api添加成员“无法为已在外部服务内发起的对象更新指定的属性". [英] Graph api add member on mail enabled group "Unable to update the specified properties for objects that have originated within an external service."

查看:68
本文介绍了启用邮件的组上的图形api添加成员“无法为已在外部服务内发起的对象更新指定的属性".的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试编写一个使用Graph api来管理广告组的MVC应用程序. 我遇到的问题是,当我尝试向启用邮件的安全组中添加或删除用户时,出现无法更新源自外部服务中的对象的指定属性". 这些操作可与常规"安全组正常工作.根据文档,它应该同时支持两者,我想念的是什么?

I've been trying to write an MVC application that uses the Graph api to administrate AD Groups. The problem I'm running into is when I try to add or remove users to Mail enabled security groups I get "Unable to update the specified properties for objects that have originated within an external service." These operations work fine with "normal" Security groups. According to the docs it should support both, what am I missing?

代码:

bool userAdded = false;
        GraphServiceClient graphClient = GetAuthenticatedClient();
        try
        {
            var user = await graphClient.Users[userId].Request().GetAsync();
            await graphClient.Groups[groupId].Members.References.Request).AddAsync(user);
            Debug.WriteLine("Added user " + userId + " to the group: " + groupId);
            userAdded = true;
        }

推荐答案

启用邮件的安全组当前无法在Azure AD中直接进行更新,它们是从本地进行管理的(如果要从本地同步)目录,或从Exchange Online.

Mail-enabled security groups cannot currently be updated directly in Azure AD, they are managed either from on-premises (if you're syncing from an on-premises directory with Azure AD Connect), or from Exchange Online.

这篇关于启用邮件的组上的图形api添加成员“无法为已在外部服务内发起的对象更新指定的属性".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆