Graph api add member on mail enabled group“无法更新源自外部服务的对象的指定属性." [英] Graph api add member on mail enabled group "Unable to update the specified properties for objects that have originated within an external service."

查看:17
本文介绍了Graph api add member on mail enabled group“无法更新源自外部服务的对象的指定属性."的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试编写一个使用 Graph api 来管理 AD 组的 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 中直接更新已启用邮件的安全组,它们是从本地管理的(如果您从本地同步目录与 Azure AD Connect),或从 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.

这篇关于Graph api add member on mail enabled group“无法更新源自外部服务的对象的指定属性."的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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