Skip to content

Groups

Must read

Overview

Provisioning

https://github.com/SharePoint/PnP-PowerShell/tree/master/Samples/Provisioning.SelfHostedWithAzureWebJob/Engine

Permissions

Tipps

# SiteCollection URL <site>
<site>/_layouts/15/groupstatus.aspx?Target=PLANNER

# XML Provisioning Engine - SiteCollection Token {site}
{site}/_layouts/15/groupstatus.aspx?Target=PLANNER

Powershell

To get the list of all the Office 365 groups in descending order:

Get-UnifiedGroup | Select Id, DisplayName, ManagedBy, Alias, AccessType, WhenCreated, @{Expression={([array](Get-UnifiedGroupLinks -Identity $_.Id -LinkType Members)).Count }; Label=Members} | Sort-Object whencreated | Format-Table displayname, alias, managedby, Members, accesstype, whencreated

To get the list of all private Office 365 groups in your tenant:

Get-UnifiedGroup | Where-Object {$_.AccessType -eq Private} | Sort-Object whencreated | Format-Table displayname, alias, managedby, accesstype, whencreated

To get list of deleted Office 365 groups in descending order:

Get-AzureADMSDeletedGroup | Sort-Object DeletedDateTime -Descending | Format-Table Id, DisplayName, Description, Visibility, DeletedDateTime

How to resolve the error The alias is being used by another group in your organization

Get-AzureADMSDeletedGroup -All:$true | Remove-AzureADMSDeletedDirectoryObject

To get the list of orphaned Office 365 groups in your tenant:

$Groups = Get-UnifiedGroup | Where-Object {([array](Get-UnifiedGroupLinks -Identity $_.Id -LinkType Owners)).Count -eq 0} `

| Select Id, DisplayName, ManagedBy, WhenCreated

ForEach ($G in $Groups) {

Write-Host Warning! The following group has no owner: $G.DisplayName

}

To determine where a group was provisioned (Planner, Yammer, Teams etc.)

Get-UnifiedGroup |Where-Object {$_.ProvisioningOption -eq YammerProvisioning} |select DisplayName,Alias,ProvisioningOption,GroupSKU,SharePointSiteUrl,SharePointDocumentsUrl,AccessType

To get the list of Teams integrated Office 365 group list:

Get-UnifiedGroup |Where-Object {$_.ProvisioningOption -eq ExchangeProvisioningFlags:481}|select DisplayName,Alias,ProvisioningOption,GroupSKU,SharePointSiteUrl,SharePointDocumentsUrl,AccessType