Send As permission on Office 365 not with Add-ADPermission
With an On-Premises Exchange 2010 environment an administrator hands out Send-As permission with the Add-ADPermission cmdlet.
But I found out that this doesn’t work in Office 365. In this case a P plan (no Dirsync, Federation or such), you can see the result in the screenshot:
Funny thing is that if you try Add-MailboxPermission to add Send-As permission, the error message redirect you to Add-ADPermission.
For handing out Send-As permissions (and other rights) in Office 365, you’ll have to use Add-RecipientPermission. And cmdlet does not work in a On-Premise Exchange environment
Also see: Office 365 Help Give Users Send As Permission
14:47
thanks you so mutch
so you right it s work with import csv file
Get-Mailbox $_.Identity | Add-recipientPermission -AccessRights sendas -Trustee $_.upn -Confirm:$false
19:32
I'm afraid I don't really know what you are asking? If you need this to work with an CSV file, Import-CSV is indeed required. Also you need a For-Each loop in order to proces each line in the CSV, at least that is how I do it most of the time.