Forum Discussion
jcasqueiro
Feb 21, 2024Brass Contributor
Enabling "send on behalf" capabilities to users in O365 groups
Hi All ! Does anyone have a script to sweep groups in a O365 tenant and give users "send on behalf" permissions? Thanks/Brgds joao
- Feb 22, 2024Should be easy to do. Assuming you have the list of groups, you can try something like:
Get-UnifiedGroup -ResultSize 1 -PipelineVariable group | % { Get-UnifiedGroupLinks $_ -LinkType Member -ResultSize 1 | % { Set-UnifiedGroup $group -GrantSendOnBehalfTo @{add=$_.Alias} }}
Treat the above as proof of concept code, as it has zero error handling. Make sure you test it properly before running into production.
VasilMichev
Feb 22, 2024MVP
Should be easy to do. Assuming you have the list of groups, you can try something like:
Get-UnifiedGroup -ResultSize 1 -PipelineVariable group | % { Get-UnifiedGroupLinks $_ -LinkType Member -ResultSize 1 | % { Set-UnifiedGroup $group -GrantSendOnBehalfTo @{add=$_.Alias} }}
Treat the above as proof of concept code, as it has zero error handling. Make sure you test it properly before running into production.
Get-UnifiedGroup -ResultSize 1 -PipelineVariable group | % { Get-UnifiedGroupLinks $_ -LinkType Member -ResultSize 1 | % { Set-UnifiedGroup $group -GrantSendOnBehalfTo @{add=$_.Alias} }}
Treat the above as proof of concept code, as it has zero error handling. Make sure you test it properly before running into production.
jcasqueiro
Feb 23, 2024Brass Contributor
Thanks Vasil