protected override void ExecuteCmdlet()
        {
            UnifiedGroupEntity group = null;

            if (Identity != null)
            {
                group = Identity.GetGroup(AccessToken);
            }

            if (group != null)
            {
                UnifiedGroupsUtility.AddUnifiedGroupMembers(group.GroupId, Users, AccessToken, RemoveExisting.ToBool());
            }
        }
Esempio n. 2
0
        protected override void ExecuteCmdlet()
        {
            if (PnPConnection.CurrentConnection.ClientId == PnPConnection.PnPManagementShellClientId)
            {
                PnPConnection.CurrentConnection.Scopes = new[] { "Group.ReadWrite.All" };
            }

            UnifiedGroupEntity group = null;

            if (Identity != null)
            {
                group = Identity.GetGroup(AccessToken, false);
            }

            if (group != null)
            {
                UnifiedGroupsUtility.AddUnifiedGroupMembers(group.GroupId, Users, AccessToken, RemoveExisting.ToBool());
            }
        }