Forum Discussion
"Mailbox Import Export" role issue
- Aug 15, 2023Try adding the role via PowerShell:
New-ManagementRoleAssignment -Role "Mailbox Import Export" -SecurityGroup "Organization Management"
Or, you can directly assign it to the user(s) in question:
New-ManagementRoleAssignment -Role "Mailbox Import Export" -user admin1
New-ManagementRoleAssignment -Role "Mailbox Import Export" -SecurityGroup "Organization Management"
Or, you can directly assign it to the user(s) in question:
New-ManagementRoleAssignment -Role "Mailbox Import Export" -user admin1
- jps-marigold68Mar 10, 2024Copper Contributor
I am seeing the following:
PS C:\Users\jeffs> New-ManagementRoleAssignment -Role "Mailbox Import Export" -SecurityGroup "Organization Management"
Write-ErrorMessage : |Microsoft.Exchange.Configuration.Tasks.InvalidOperationInDehydratedContextException|The command
you tried to run isn't currently allowed in your organization. To run this command, you first need to run the command:
Enable-OrganizationCustomization.
At C:\Users\jeffs\AppData\Local\Temp\tmpEXO_tfzx3ihw.ckm\tmpEXO_tfzx3ihw.ckm.psm1:1191 char:13
+ Write-ErrorMessage $ErrorObject
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [New-ManagementRoleAssignment], InvalidOperatio...ontextException
+ FullyQualifiedErrorId : [Server=BYAPR15MB3240,RequestId=0ade90e2-a1ae-b16e-352c-8a07f8c0cd11,TimeStamp=Sun, 10 M
ar 2024 00:30:27 GMT],Write-ErrorMessageHowever, this is already enabled:
PS C:\Users\jeffs> Enable-OrganizationCustomization
Write-ErrorMessage : |System.InvalidOperationException|This operation is not required. Organization is already enabled
for customization.
At C:\Users\jeffs\AppData\Local\Temp\tmpEXO_tfzx3ihw.ckm\tmpEXO_tfzx3ihw.ckm.psm1:1191 char:13
+ Write-ErrorMessage $ErrorObject
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Enable-OrganizationCustomization], InvalidOperationException
+ FullyQualifiedErrorId : [Server=BYAPR15MB3240,RequestId=187e6496-df39-f799-d59a-bb39560a40b1,TimeStamp=Sun, 10 M
ar 2024 00:30:21 GMT],Write-ErrorMessage - MiSum83Aug 15, 2023Brass Contributorthe powershell worked.
1stly - it reported an error mentioning that I'm not allowed to make changes in roles.... So I have removed the global admin account I was using, created new one again... After connecting via powershell, the command ran with no issues and the role has been assigned.
Thanks!