Unable to assign the "ediscovery manager" role using powershell

curious7 251 Reputation points
2024-11-18T06:24:28.6533333+00:00

I am trying to assign the "ediscovery manager" role to a user who has M365 E5 license using powershell. If I connect to IPPSSession and run the "Add-RolegroupMember" command I get following error:- "Write-ErrorMessage : Ex6F9304|Microsoft.Exchange.Configuration.Tasks.ManagementObjectNotFoundException|The operation couldn't be performed because object 'eDiscovery Manager' couldn't be found on 'FfoRecipientSession'

And then if I connect to exchange online and run the "Add-RolegroupMember" command I get following error:- "Write-ErrorMessage : Ex6F9304|Microsoft.Exchange.Configuration.Tasks.ManagementObjectNotFoundException|The operation couldn't be performed because object 'eDiscovery Manager' couldn't be found on 'KL1PR04A08DD007.APCPR04A008.PROD.OUTLOOK.COM'"

Ultimately I want to be able to assign a group to this role, but at this stage I can't even assign a user to this role. Assigning to this role in GUI succeeds without problem.

Microsoft Purview
Microsoft Purview
A Microsoft data governance service that helps manage and govern on-premises, multicloud, and software-as-a-service data. Previously known as Azure Purview.
1,247 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Chandra Boorla 3,460 Reputation points Microsoft Vendor
    2024-11-18T09:14:38.3133333+00:00

    Hi @curious7

    Greetings & Welcome to Microsoft Q&A forum! Thanks for posting your query!

    It seems that you are encountering issues while trying to assign the "eDiscovery Manager" role using PowerShell. The error messages indicate that the object 'eDiscovery Manager' could not be found in both the IPPSSession and Exchange Online connections.

    Please try with the below steps:

    Syntax: When using the Add-RoleGroupMember command, ensure that you are using the correct syntax.

       Add-RoleGroupMember -Identity "eDiscoveryManager" -Member <UserIdentity>
    
    • You must use Connect-IPPSSession
    • "eDiscoveryManager" must be typed without spaces (even though in the official documentation it is "eDiscovery Manager"

    Example code:

    Update-Module ExchangeOnlineManagement
    Import-Module ExchangeOnlineManagement
    $UPN = 'globalAdmin@lab.onmicrosoft.com'
    Connect-ExchangeOnline -UserPrincipalName $UPN
    Connect-IPPSSession -UserPrincipalName  $UPN
    $UPN1 = 'manager@lab.onmicrosoft.com'
    Add-RoleGroupMember -identity "eDiscoveryManager" -Member $UPN1
    

    Please refer this similar thread: https://learn.microsoft.com/en-us/answers/questions/1664985/cannot-add-ediscovery-manager-using-ps

    I hope this information helps. Please do let us know if you have any further queries.


    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.