You can’t set a security group as a site owner when you use the Set-SPOUser cmdlet in the SharePoint Online Management Shell

PROBLEM

Assume that you synchronize an Active Directory security group with your organization, and you want to change the site owner for a site collection. When you try to use the Set-SPOUser cmdlet in the SharePoint Online Management Shell to add or remove a security group as a site owner, the group isn't added or removed as an owner. Additionally, you receive the following error message:

+ CategoryInfo : NotSpecified: (:) [Set-SPOUser], ServerException
+ FullyQualifiedErrorId :
Microsoft.SharePoint.Client.ServerException,Microsoft.Online.SharePoint.PowerShell.SetSPOUser

Workaround

To work around this problem, use the full account name for the security group in the LoginName parameter for the cmdlet. To locate the full account name, follow these steps:
  1. Sign in to the Office 365 portal.
  2. Browse to the affected site collection.
  3. Click the gear icon, and then click Site settings.
  4. In the User and Permissions section, click People and groups.
  5. In the address bar for the People and Groups page, locate the MembershipGroupId= section in the URL.
  6. Update the URL by changing the MembershipGroupId= value to 0, and then press Enter.
  7. Click the affected security group to open the User Information page.
  8. Locate the Account value for the full account name.

    Note This value begins with c:0-.f|rolemanager|and ends with a globally unique identifier (GUID).
  9. Run the Set-SPOUser cmdlet by using the full account name. For example, run the following command:
    Set-SPOUser -Site https://contoso.sharepoint.com/sites/<SiteCollectionName> -LoginName "c:0-.f|rolemanager|<GUID>" -IsSiteCollectionAdmin $true 

MORE INFORMATION

For more information about the Set-SPOUser cmdlet, see the following TechNet topic:

Still need help? Go to Microsoft Community.
Свойства

Номер статьи: 3133688 — последний просмотр: 29 дек. 2016 г. — редакция: 1

Microsoft Office SharePoint Online

Отзывы и предложения