How to Assign User to SharePoint Online Administrator Role in Office 365?

Requirement: Set SharePoint Online Administrator

As the SharePoint Online administration is done by people other than Tenant Admin (or Global Administrator!) in most of the companies, You may need to delegate roles in Office 365, so that users get administrative privileges to specific services such as SharePoint, without being full tenant admins. Global administrators in Office 365 have the rights to assign users with SharePoint administrator roles to manage SharePoint Online.

Users with a SharePoint admin role can manage site collections such as creating sites, Delete sites, designate site collection administrators, Manage site collection storage, manage service applications like user profiles, and more. In addition, SharePoint admins can manage Office 365 groups, including creating, deleting, and restoring groups. Let's see how to give SharePoint Online admin access.

How to Assign the SharePoint Online Administrator Role?
Basically, You have to assign users with an admin role to any of the Microsoft admin centers. To add a user to a SharePoint Online Administrator, do the following:
  • Login to Office 365 Admin Center: https://admin.microsoft.com
  • Expand the "Users" node in the left navigation >> Click on Active Users 
  • Search and Select the user you want to make SharePoint Online Administrator >> Click on "Manage Roles" from the toolbar. 
  • In Manage role pane, Select the "Admin Center Access" option and then tick the checkbox for "SharePoint Admin" . 
  • Click on the "Save Changes" button once done.
    add user to sharepoint online administrator
This assigns SharePoint Online administrator in Office 365. Alternately, You can click on the "Roles" link from the left navigation of the Admin Center >> Click on "SharePoint Admin" and then "Add Users" to the SharePoint Online Administrator role.
how to assign sharepoint online administrator
This provides access to the SharePoint Admin Center.

PowerShell to Add User to SharePoint  Online Administrator Role
Here is the PowerShell to add a user to SharePoint Admin role in Office 365.
#Connect to Azure AD
Connect-AzureAD

#Parameters
$UserAccount="[email protected]"
$RoleName="SharePoint Service Administrator"

#Get the User
$User = Get-AzureADUser | Where {$_.UserPrincipalName -eq $UserAccount}

#Get the Role
$Role = Get-AzureADDirectoryRole | Where {$_.DisplayName -eq $RoleName}

#Add User to Role
Add-AzureADDirectoryRoleMember -ObjectId $Role.ObjectId -RefObjectId $User.ObjectID
This would prompt for credentials. Enter your Global Administrator credentials to authenticate in Azure AD.

Please note, SharePoint Site collection administrators could be different from SharePoint Online Administrators! Site collection Admins don't need to have an admin role in Office 365 and cannot access the SharePoint admin center.
It's a good idea to grant the "Service Administrator" role in addition to SharePoint Online Administrators, so that they get all service notifications, such as downtime, known issues, etc. in the service health and message center dashboard!
You can use the same approach to add additional global admins as well. Here is how to set Global admin for SharePoint Online using PowerShell:
#Connect to Azure AD
Connect-AzureAD
 
#Parameters
$UserAccount="[email protected]"
$RoleName="Company Administrator"
 
#Get the User
$User = Get-AzureADUser | Where {$_.UserPrincipalName -eq $UserAccount}
 
#Get the Role
$Role = Get-AzureADDirectoryRole | Where {$_.DisplayName -eq $RoleName}
 
#Add User to Role
Add-AzureADDirectoryRoleMember -ObjectId $Role.ObjectId -RefObjectId $User.ObjectID

How to Set Global Admin for SharePoint Online using PowerShell?
Please note, Granting "SharePoint Admin" or "Global Admin" doesn't gain you access to the site automatically! You must add the user as Site collection Administrator to the sites in order to gain full control to the Site! Here is how: How to Add Site Collection Administrator in SharePoint Online using PowerShell?

No comments:

Please Login and comment to get your questions answered!

Powered by Blogger.