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.