Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EXOMailboxPermission: Ignore SendAs permissions during export #4096

Merged
merged 2 commits into from
Jan 8, 2024

Conversation

@NikCharlebois
Copy link
Collaborator

Should we also handle the case where the config specifies this setting and print out a warning in the Set-TargetResource? @malauter

@malauter
Copy link
Member Author

malauter commented Jan 1, 2024

Should we also handle the case where the config specifies this setting and print out a warning in the Set-TargetResource? @malauter

I don't think so. SendAs is not part of the validate set of the AccessRights attribute and it is configured with another cmdlet/DSC resource. It looks like that there are only some specific cases where the Get cmdlet returns some SendAs perms for the owner of the mailbox. So, I think it is enough to ignore this during the export.

@salbeck-sit
Copy link
Contributor

As indicated by @malauter, SendAs is managed as a user-permission and not a mailbox-permission, see https://learn.microsoft.com/en-us/powershell/module/exchange/add-recipientpermission?view=exchange-ps
It should still be possible to assign SendAs permissions to a mailbox and Export should reflect it.

@malauter
Copy link
Member Author

malauter commented Jan 2, 2024

As indicated by @malauter, SendAs is managed as a user-permission and not a mailbox-permission, see https://learn.microsoft.com/en-us/powershell/module/exchange/add-recipientpermission?view=exchange-ps It should still be possible to assign SendAs permissions to a mailbox and Export should reflect it.

It should be of course possible, but not in this resource. This resource covers mailbox permissions only. We would need another resource for the users permissions. From my point of view, it is a bug of the Get-MailboxPermission cmdlet, that it returns sometimes also user permissions. This PR is designed to handle this bug only.

@salbeck-sit
Copy link
Contributor

The existing DSC-resource could include SendAs-permissions where they pertain to mailboxes since the purpose of DSC is to abstract away the means of implementation.
Get-/Add-RecipientPermission has a wider scope but I agree that if such a DSC-resource is created then the integrity of the settings may fall apart. I'll play around with it for a bit and see what I can make of it.

@NikCharlebois NikCharlebois merged commit 1f4483b into microsoft:Dev Jan 8, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment