I want to know how to create a users group in Office 365 Admin using PowerShell. Is there a possibility to add this group to TermStore Administrators and TermSet Contributor - Through Powershell only.


1 Answer 1


You could consider the following options for creating a Group:

Using SharePoint Online Management Shell

New-SPOSiteGroup cmdlet creates a new group in a SharePoint Online site collection, for example:

Connect-SPOService -Url https://contoso-admin.sharepoint.com -credential admin@contoso.com
New-SPOSiteGroup -Site https://contoso.sharepoint.com/sites/siteA -Group "Project Leads" -PermissionLevels "Full Control"

Consume CSOM/REST APIs in PowerShell

How to create SharePoint Group using CSOM in PowerShell:


Function Get-SPOCredentials([string]$UserName,[string]$Password)
    $SecurePassword = $Password | ConvertTo-SecureString -AsPlainText -Force
    return New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($UserName, $SecurePassword)

Function Create-SPOGroup([Microsoft.SharePoint.Client.ClientContext]$Context,[string]$Title,[string]$Description) 
    $info=New-Object Microsoft.SharePoint.Client.GroupCreationInformation 


$UserName = "username@contoso.onmicrosoft.com"
$Password = Read-Host -Prompt "Enter the password"    
$Url = "https://contoso.sharepoint.com/"

$context = New-Object Microsoft.SharePoint.Client.ClientContext($Url)
$context.Credentials = Get-SPOCredentials -UserName $UserName -Password $Password
Create-SPOGroup -Context $context -Title "Foo" -Description ""

Regarding adding TermStore Administrators, AFAIK it is only supported via Server Side Object Model using TermStore.AddTermStoreAdministrator method

  • Thanks for the reply. Can we add Group Manager , Contributor , owner to a Group and TermSet in TermStore in SharePoint Online using Powershell? Something like what is explained here - blogs.c5insight.com/Home/entryid/435/… Apr 20, 2015 at 9:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.