Skip to content

Commit ffad9b4

Browse files
Merge pull request #247356 from bhaimicrosoft/groups-troubleshooting
Groups troubleshooting Document
2 parents 4b48d4f + 60a49cc commit ffad9b4

File tree

2 files changed

+39
-24
lines changed

2 files changed

+39
-24
lines changed

articles/active-directory/enterprise-users/groups-restore-deleted.md

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,17 @@ ms.collection: M365-identity-device-management
1616
---
1717
# Restore a deleted Microsoft 365 group in Azure Active Directory
1818

19-
When you delete a Microsoft 365 group in Azure Active Directory (Azure AD), part of Microsoft Entra, the deleted group is retained but not visible for 30 days from the deletion date. This behavior is so that the group and its contents can be restored if needed. This functionality is restricted exclusively to Microsoft 365 groups in Azure AD. It is not available for security groups and distribution groups. Please note that the 30-day group restoration period is not customizable.
19+
When you delete a Microsoft 365 group in Azure Active Directory (Azure AD), part of Microsoft Entra, the deleted group is retained but not visible for 30 days from the deletion date. This behavior is so that the group and its contents can be restored if needed. This functionality is restricted exclusively to Microsoft 365 groups in Azure AD. It isn't available for security groups and distribution groups. Please note that the 30-day group restoration period isn't customizable.
2020

2121
> [!NOTE]
22-
> Don't use `Remove-MsolGroup` because it purges the group permanently. Always use `Remove-AzureADMSGroup` to delete a Microsoft 365 group.
22+
> Don't use `Remove-MsolGroup` because it purges the group permanently. Always use `Remove-MgBetaGroup` to delete a Microsoft 365 group.
2323
2424
The permissions required to restore a group can be any of the following:
2525

2626
Role | Permissions
2727
--------- | ---------
28-
Global administrator, Group administrator, Partner Tier2 support, and Intune administrator | Can restore any deleted Microsoft 365 group
29-
User administrator and Partner Tier1 support | Can restore any deleted Microsoft 365 group except those groups assigned to the Global Administrator role
28+
Global administrator, Group administrator, Partner Tier 2 support, and Intune administrator | Can restore any deleted Microsoft 365 group
29+
User administrator and Partner Tier 1 support | Can restore any deleted Microsoft 365 group except those groups assigned to the Global Administrator role
3030
User | Can restore any deleted Microsoft 365 group that they own
3131

3232
## View and manage the deleted Microsoft 365 groups that are available to restore
@@ -46,19 +46,21 @@ User | Can restore any deleted Microsoft 365 group that they own
4646

4747
## View the deleted Microsoft 365 groups that are available to restore using PowerShell
4848

49-
The following cmdlets can be used to view the deleted groups to verify that the one or ones you're interested in have not yet been permanently purged. These cmdlets are part of the [Azure AD PowerShell module](https://www.powershellgallery.com/packages/AzureAD/). More information about this module can be found in the [Azure Active Directory PowerShell Version 2](/powershell/azure/active-directory/install-adv2) article.
49+
The following cmdlets can be used to view the deleted groups to verify that the one or ones you're interested in haven't yet been permanently purged. These cmdlets are part of the [Microsoft Graph PowerShell module](/powershell/microsoftgraph/installation?view=graph-powershell-1.0&preserve-view=true). More information about this module can be found in the [Microsoft Graph PowerShell overview](/powershell/microsoftgraph/overview?view=graph-powershell-1.0&preserve-view=true) article.
5050

51-
1. Run the following cmdlet to display all deleted Microsoft 365 groups in your Azure AD organization that are still available to restore.
51+
1. Run the following cmdlet to display all deleted Microsoft 365 groups in your Azure AD organization that are still available to restore. Please install the [Graph](/powershell/microsoftgraph/installation?view=graph-powershell-1.0&preserve-view=true) beta version if it isn't already installed on the machine.
5252

5353

5454
```powershell
55-
Get-AzureADMSDeletedGroup
55+
Install-Module Microsoft.Graph.Beta
56+
Connect-MgGraph -Scopes "Group.ReadWrite.All"
57+
Get-MgBetaDirectoryDeletedGroup
5658
```
5759
58-
2. Alternately, if you know the objectID of a specific group (and you can get it from the cmdlet in step 1), run the following cmdlet to verify that the specific deleted group has not yet been permanently purged.
60+
2. Alternately, if you know the objectID of a specific group (and you can get it from the cmdlet in step 1), run the following cmdlet to verify that the specific deleted group hasn't yet been permanently purged.
5961
60-
```
61-
Get-AzureADMSDeletedGroup –Id <objectId>
62+
```powershell
63+
Get-MgBetaDirectoryDeletedGroup -DirectoryObjectId <objectId>
6264
```
6365
6466
## How to restore your deleted Microsoft 365 group using
@@ -68,20 +70,20 @@ Once you have verified that the group is still available to restore, restore the
6870
1. Run the following cmdlet to restore the group and its contents.
6971
7072
71-
```
72-
Restore-AzureADMSDeletedDirectoryObject –Id <objectId>
73+
```powershell
74+
Restore-MgBetaDirectoryDeletedItem -DirectoryObjectId <objectId>
7375
```
7476
7577
2. Alternatively, the following cmdlet can be run to permanently remove the deleted group.
7678
7779
78-
```
79-
Remove-AzureADMSDeletedDirectoryObject –Id <objectId>
80+
```powershell
81+
Remove-MgBetaDirectoryDeletedItem -DirectoryObjectId <objectId>
8082
```
8183
8284
## How do you know this worked?
8385
84-
To verify that you’ve successfully restored a Microsoft 365 group, run the `Get-AzureADGroup –ObjectId <objectId>` cmdlet to display information about the group. After the restore request is completed:
86+
To verify that you’ve successfully restored a Microsoft 365 group, run the `Get-MgBetaGroup –GroupId <objectId>` cmdlet to display information about the group. After the restore request is completed:
8587
8688
- The group appears in the Left navigation bar on Exchange
8789
- The plan for the group will appear in Planner

articles/active-directory/enterprise-users/groups-troubleshooting.md

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,32 @@ This article contains troubleshooting information for groups in Azure Active Dir
2121
## Troubleshooting group creation issues
2222

2323
**I disabled security group creation in the Azure portal but groups can still be created via PowerShell**
24-
The **User can create security groups in Azure portals** setting in the Azure portal controls whether or not non-admin users can create security groups in the Access panel or the Azure portal. It does not control security group creation via PowerShell.
24+
The **User can create security groups in Azure portals** setting in the Azure portal controls whether or not nonadmin users can create security groups in the Access panel or the Azure portal. It does not control security group creation via PowerShell.
2525

26-
To disable group creation for non-admin users in PowerShell:
27-
1. Verify that non-admin users are allowed to create groups:
26+
To disable group creation for nonadmin users in PowerShell:
27+
1. Verify that nonadmin users are allowed to create groups:
2828

2929
```powershell
30-
Get-MsolCompanyInformation | Format-List UsersPermissionToCreateGroupsEnabled
30+
Get-MgBetaDirectorySetting | select -ExpandProperty values
3131
```
3232

33-
2. If it returns `UsersPermissionToCreateGroupsEnabled : True`, then non-admin users can create groups. To disable this feature:
33+
2. If it returns `EnableGroupCreation : True`, then nonadmin users can create groups. To disable this feature:
3434

3535
```powershell
36-
Set-MsolCompanySettings -UsersPermissionToCreateGroupsEnabled $False
36+
Install-Module Microsoft.Graph.Beta.Identity.DirectoryManagement
37+
Import-Module Microsoft.Graph.Beta.Identity.DirectoryManagement
38+
$params = @{
39+
TemplateId = "62375ab9-6b52-47ed-826b-58e47e0e304b"
40+
Values = @(
41+
@{
42+
Name = "EnableGroupCreation"
43+
Value = "false"
44+
}
45+
)
46+
}
47+
Connect-MgGraph -Scopes "Directory.ReadWrite.All"
48+
New-MgBetaDirectorySetting -BodyParameter $params
49+
3750
```
3851

3952
**I received a max groups allowed error when trying to create a Dynamic Group in PowerShell**
@@ -46,7 +59,7 @@ To create any new Dynamic groups, you'll first need to delete some existing Dyna
4659
**I configured a rule on a group but no memberships get updated in the group**
4760
1. Verify the values for user or device attributes in the rule. Ensure there are users that satisfy the rule.
4861
For devices, check the device properties to ensure any synced attributes contain the expected values.
49-
2. Check the membership processing status to confirm if it is complete. You can check the [membership processing status](groups-create-rule.md#check-processing-status-for-a-rule) and the last updated date on the **Overview** page for the group.
62+
2. Check the membership processing status to confirm if it's complete. You can check the [membership processing status](groups-create-rule.md#check-processing-status-for-a-rule) and the last updated date on the **Overview** page for the group.
5063

5164
If everything looks good, please allow some time for the group to populate. Depending on the size of your Azure AD organization, the group may take up to 24 hours for populating for the first time or after a rule change.
5265

@@ -57,15 +70,15 @@ This is expected behavior. Existing members of the group are removed when a rule
5770
Dedicated membership evaluation is done periodically in an asynchronous background process. How long the process takes is determined by the number of users in your directory and the size of the group created as a result of the rule. Typically, directories with small numbers of users will see the group membership changes in less than a few minutes. Directories with a large number of users can take 30 minutes or longer to populate.
5871

5972
**How can I force the group to be processed now?**
60-
Currently, there is no way to automatically trigger the group to be processed on demand. However, you can manually trigger the reprocessing by updating the membership rule to add a whitespace at the end.
73+
Currently, there's no way to automatically trigger the group to be processed on demand. However, you can manually trigger the reprocessing by updating the membership rule to add a whitespace at the end.
6174

6275
**I encountered a rule processing error**
6376
The following table lists common dynamic membership rule errors and how to correct them.
6477

6578
| Rule parser error | Error usage | Corrected usage |
6679
| --- | --- | --- |
6780
| Error: Attribute not supported. |(user.invalidProperty -eq "Value") |(user.department -eq "value")<br/><br/>Make sure the attribute is on the [supported properties list](groups-dynamic-membership.md#supported-properties). |
68-
| Error: Operator is not supported on attribute. |(user.accountEnabled -contains true) |(user.accountEnabled -eq true)<br/><br/>The operator used is not supported for the property type (in this example, -contains cannot be used on type boolean). Use the correct operators for the property type. |
81+
| Error: Operator isn't supported on attribute. |(user.accountEnabled -contains true) |(user.accountEnabled -eq true)<br/><br/>The operator used isn't supported for the property type (in this example, -contains can't be used on type boolean). Use the correct operators for the property type. |
6982
| Error: Query compilation error. | 1. (user.department -eq "Sales") (user.department -eq "Marketing")<br>2. (user.userPrincipalName -match "\*@domain.ext") | 1. Missing operator. Use -and or -or to join predicates<br>(user.department -eq "Sales") -or (user.department -eq "Marketing")<br>2. Error in regular expression used with -match<br>(user.userPrincipalName -match ".\*@domain.ext")<br>or alternatively: (user.userPrincipalName -match "@domain.ext$") |
7083

7184
## Next steps

0 commit comments

Comments
 (0)