Enterprise Deployment

2 min read • 257 words
Deploy 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/crx

Edge  

Same policy, applied via Edge-specific GPO templates or Intune configuration profiles.

Google Workspace Admin Console  

  1. Go to Admin ConsoleDevicesChromeApps & extensions
  2. Add the extension by ID
  3. 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_mapi

Step 3: Pre-Authorize the OAuth App  

To avoid each user being prompted for OAuth consent:

  1. Create a GCP project with the Gmail API enabled
  2. Configure an OAuth 2.0 client ID (type: Chrome Extension)
  3. Domain-wide delegation (optional): pre-authorize the Gmail send scope in Google Workspace admin

Uninstalling  

.\install.ps1 -Uninstall -Unattended

This removes all registry entries, files, and restores the previous default mail client.

Follow me

I work on everything coding and tweet developer memes