Photo by Tejas Choudhary / Unsplash

Purview PowerShell : fix the "matches multiple entries" error

Bastien Perez
Bastien Perez
· 1 min read

Table of Contents

No matching heading

When managing Microsoft 365 compliance (Purview) via Connect-IPPSession, some cmdlets like Get-RoleGroupMember may fail.

For example, the command:

Get-RoleGroupMember -Identity xxx 

will fail if you use the DistinguishedName or Identity value. You will get the following error:

Get-RoleGroupMember: Ex9E65A2|
Microsoft.Exchange.Configuration.Tasks.ManagementObjectNotFoundException|
The operation couldn't be performed because object:          'FFO.extest.microsoft.com/Microsoft Exchange Hosted Organizations/xxx.onmicrosoft.com/Configuration/OrganizationManagement' matches multiple entries.

To fix this issue, use a unique parameter like ExchangeObjectId. For example, for the group Organization Management:

$group = Get-RoleGroup 'Organization Management'
Get-RoleGroupMember -Identity $group.ExchangeObjectId
Enjoyed this article?
If you found it useful, consider supporting my work with a small tip.
Buy me a coffee
Microsoft 365

Bastien Perez

Freelance Microsoft 365 - Active Directory - Modern Workplace

Comments