locked
Permissions RRS feed

  • Question

  • Hi have shared mailbox on cloud and i want to assign full accesss, send as and send onbalf permission, please correct me with the below syntax's if they are wrong.

    Export Full Access Permissions for shared mailbox

    Get-MailboxPermission -Identity SharedMailbox@contoso.com  | Select-Object identity,user,@{Name="Accessrights";Expression={$_.Accessrights}} | Export-Csv C:\fullaccess.csv -NoTypeInformation

    Export Send on Behalf permissions for shared mailbox

    Get-Mailbox -Identity SharedMailbox@contoso.com | Select-Object name,displayname,alias,@{Name="GrantSendOnBehalfTo";Expression={$_.GrantSendOnBehalfTo}} | Export-Csv C:\Sendonbehalf.csv -NoTypeInformation

    Export Send AS permissions for shared mailbox

    Get-RecipientPermission -Identity SharedMailbox@contoso.com | Get-ADPermission | Where-Object {$_.extendedrights -like "*Send*"} | Select-Object Identity,User,@{Name="extendedrights";Expression={$_.extendedrights}}  | Export-Csv C:\SendAs.csv -NoTypeInformation

    will the above 3 syntax's work for regular mailbox also.

    using below syntax's i can add/remove users to shared mailbox but i have csv file which is in below format how do i add the users or remove the users by importing the csv file, please help me with send on behalf permissions also. will the same syntaxes work for regular mailboxes.

    Users
    user2@contoso.com
    user3@contoso.com

    Add-MailboxPermission -Identity SharedMailbox@contoso.com -User user1@contoso.com -AccessRights FullAccess -InheritanceType All
    Add-RecipientPermission SharedMailbox@contoso.com -AccessRights SendAs -Trustee "user1@contoso.com"
    Remove-MailboxPermission -Identity SharedMailbox@contoso.com -User user1@contoso.com -AccessRights FullAccess
    Remove-RecipientPermission SharedMailbox@contoso.com -AccessRights SendAs -Trustee "user1@contoso.com"


    • Edited by ItsMe-Roger Monday, December 23, 2019 5:55 AM f
    Monday, December 23, 2019 5:53 AM

Answers

  • Hi,

    I have tried the command you provided above, Full Access and Send On behalf can work properly.

    For getting Send As csv file we can use the following command:

    Get-Mailbox -Identity SharedMailbox@contoso.com  | Get-RecipientPermission | Where {$_.AccessRights -eq "SendAs"} | Select Identity, AccessRights, Trustee | Export-Csv -Path C:\SendAs.csv -NoTypeInformation

    For your second question, according to the CSV format you provided, use the following command to grant send on behalf permission, I have tried and it can work properly

    $UserList = import-CSV C:\user.csv 
    ForEach ($User in $UserList){Set-Mailbox -Identity SharedMailbox@contoso.com -GrantSendOnBehalfTo @{Add=$user.users}}

    Regards,

    Joyce Shen


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    Tuesday, December 24, 2019 2:43 AM

All replies

  • Hi,

    I have tried the command you provided above, Full Access and Send On behalf can work properly.

    For getting Send As csv file we can use the following command:

    Get-Mailbox -Identity SharedMailbox@contoso.com  | Get-RecipientPermission | Where {$_.AccessRights -eq "SendAs"} | Select Identity, AccessRights, Trustee | Export-Csv -Path C:\SendAs.csv -NoTypeInformation

    For your second question, according to the CSV format you provided, use the following command to grant send on behalf permission, I have tried and it can work properly

    $UserList = import-CSV C:\user.csv 
    ForEach ($User in $UserList){Set-Mailbox -Identity SharedMailbox@contoso.com -GrantSendOnBehalfTo @{Add=$user.users}}

    Regards,

    Joyce Shen


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    Tuesday, December 24, 2019 2:43 AM
  • Hi,

    Do suggestions above help? If you have any questions or needed further help on this issue, please feel free to post back. If the issue has been resolved, please mark the helpful replies as answers, this will make answer searching in the forum easier and be beneficial to other community members as well.

    Regards,

    Joyce Shen


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    Thursday, December 26, 2019 1:43 AM