How to Automate Send-on-Behalf Permissions for Microsoft 365 Groups
Question details
A background C# service requires a method to programmatically grant send-on-behalf permissions to all members of a Microsoft 365 or Office 365 group.

- Product
- Microsoft 365
- Device & OS
- not provided
- Scenario
- Automating administrative permission tasks for Microsoft 365 groups using a custom C# background service.
- Observed behavior
- The Microsoft Graph API does not provide an obvious or direct endpoint to automate send-on-behalf permissions for group members.
Ensure you have Exchange Administrator privileges in your Microsoft 365 tenant and a properly configured test environment before running automated permission scripts.
Use Exchange Online Management APIs and PowerShell Automation
Since Microsoft Graph API lacks a direct method, the most reliable workaround is to utilize Exchange Online PowerShell modules via automation.
Microsoft Graph API currently does not offer a simple endpoint to automatically grant send-on-behalf permissions to every member of a Microsoft 365 group. Developers need to rely on Exchange Online PowerShell commands wrapped within their C# service or use Exchange management APIs.
When implementing this, your application identity must have the necessary Exchange role permissions. Always test your automation scripts in a non-production tenant to avoid unintended access alterations across your organization.
Register your background application in Microsoft Entra ID (Azure AD) and grant it Exchange Administrator permissions.
Implement Certificate-Based Authentication (CBA) in your C# service to securely connect to Exchange Online PowerShell.
Use the C# PowerShell SDK to invoke the 'Set-UnifiedGroup' cmdlet with the '-GrantSendOnBehalfTo' parameter, iterating through your target group members.

Try WPS Office for Your Daily Productivity Needs
While automating Microsoft 365 group permissions requires complex administrative scripting, your daily document work shouldn't be complicated. WPS Office provides a free, lightweight, and highly compatible alternative to Microsoft Office for creating, editing, and sharing documents seamlessly.
- 1. Download the Installer: Visit the official WPS Office website and download the free installation package for your operating system.
- 2. Install the Software: Run the installer and follow the on-screen instructions to complete the setup process in just a few minutes.
- 3. Open Your Office Files: Launch WPS Office and directly open any existing .docx, .xlsx, or .pptx files with perfect formatting preservation.

Frequently Asked Questions
Why can't I use Microsoft Graph API for send-on-behalf permissions?
Microsoft Graph API does not currently expose a direct endpoint to manage the 'GrantSendOnBehalfTo' property for Microsoft 365 Groups, necessitating the use of Exchange Online PowerShell as a workaround.
Can I automate this without app-only authentication?
For a background C# service running without user interaction, you must use app-only authentication, such as Certificate-Based Authentication, to connect to Exchange Online securely and execute the necessary commands.
Are send-on-behalf and send-as permissions the same?
No. Send-on-behalf shows the recipient that the email was sent by a specific user 'on behalf of' the group, whereas send-as makes the email appear as if it was sent directly by the group itself.




