Hybrid : Full access permissions and automapping

Christian Hans
Christian Hans used Ask the Experts™
on
I am trying to give Exchange Online user John@contoso.com Full access permissions and automapping to On-Prem mailbox Sales@contoso.com but am getting the error below:


Following: https://practical365.com/exchange-online/configuring-exchange-hybrid-cross-forest-permissions/


Set-ADUser -Identity John@contoso.com -Add @{msExchDelegateListLink/BL=Sales@contoso.com}
At line:1 char:79
+ Set-ADUser -Identity John@contoso.com -Add @{msExchDelegateListLink/B ...
+                                                                               ~
Missing '=' operator after key in hash literal.
At line:1 char:79
+ Set-ADUser -Identity John@contoso.com -Add @{msExchDelegateListLink/B ...
+                                                                               ~
The hash literal was incomplete.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : MissingEqualsInHashLiteral


Any ideas folks?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2015
Distinguished Expert 2018

Commented:
Automapping is not supported cross-premises. Even if it was, the formatting is off, those are two separate attributes: msExchDelegateListBL and msExchDelegateListLink. The first one is a 'backlink', this it's set on the delegate object and refers to the mailbox on which permissions are granted, the second one host the delegate DN.
Top Rated Freelancer on MS Technologies
Awarded 2018
Distinguished Expert 2018
Commented:
I think you're using the wrong cmdlet.

https://docs.microsoft.com/en-us/powershell/module/exchange/mailboxes/add-mailboxpermission?view=exchange-ps

connect to exchange online
https://docs.microsoft.com/en-us/powershell/exchange/exchange-online/connect-to-exchange-online-powershell/connect-to-exchange-online-powershell?view=exchange-ps
and run

Set-ExecutionPolicy RemoteSigned
$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session -DisableNameChecking
Add-MailboxPermission -Identity "Sales@contoso.com" -User "John@contoso.com" -AccessRights FullAccess -InheritanceType All

Open in new window


The other solution would be from the on-premises itself, same cmdlet but on the Exchange Server PS console:
Add-MailboxPermission -Identity "Sales@contoso.com" -User "John@contoso.com" -AccessRights FullAccess -InheritanceType All

Open in new window


Give it a try

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial