Enterprise Deployment
2 min read • 257 wordsDeploy go-mapi across your organization using GPO, SCCM, Intune, or scripted installation.
go-mapi is designed for enterprise deployment. All components support unattended installation and can be managed via Group Policy.
Deployment Overview
| Component | Method |
|---|---|
| Browser extension | Chrome/Edge enterprise policy (force-install) |
| Native host + DLL | PowerShell installer with -Unattended flag |
| OAuth consent | Google Workspace admin pre-approval |
Step 1: Force-Install the Extension
Use Chrome or Edge enterprise policies to install the extension automatically:
Chrome (via GPO or Intune)
Set the
ExtensionInstallForcelist
policy:
<extension-id>;https://clients2.google.com/service/update2/crxEdge
Same policy, applied via Edge-specific GPO templates or Intune configuration profiles.
Google Workspace Admin Console
- Go to Admin Console → Devices → Chrome → Apps & extensions
- Add the extension by ID
- Set installation policy to Force install
Step 2: Deploy the Native Host
Run the installer in unattended mode via your deployment tool (SCCM, Intune, PDQ, etc.):
# Download and run the installer silently
irm https://raw.githubusercontent.com/marcfargas/go-mapi/main/scripts/install.ps1 -OutFile install.ps1
.\install.ps1 -Unattended -ExtensionId "<your-extension-id>"Installer Flags
| Flag | Description |
|---|---|
-Unattended |
No prompts, no interactive UI |
-ExtensionId <id> |
Skip auto-detection, use specified ID |
-Version <tag> |
Pin to a specific release version |
-InstallDir <path> |
Custom installation directory |
Verify via Registry
After installation, these registry keys should exist:
HKLM:\SOFTWARE\Clients\Mail\go-mapi
HKLM:\SOFTWARE\Google\Chrome\NativeMessagingHosts\com.marcfargas.go_mapi
HKLM:\SOFTWARE\Microsoft\Edge\NativeMessagingHosts\com.marcfargas.go_mapiStep 3: Pre-Authorize the OAuth App
To avoid each user being prompted for OAuth consent:
- Create a GCP project with the Gmail API enabled
- Configure an OAuth 2.0 client ID (type: Chrome Extension)
- Domain-wide delegation (optional): pre-authorize the Gmail send scope in Google Workspace admin
Uninstalling
.\install.ps1 -Uninstall -UnattendedThis removes all registry entries, files, and restores the previous default mail client.