Connect with Your Own OAuth App (BYOC)
Use your own Google Cloud or Microsoft Azure app to connect email and calendar instead of SalesPartner's shared credentials. Step-by-step setup for Google Cloud Console and Microsoft Entra.
When to Use This
Custom OAuth (BYOC — Bring Your Own Credentials) lets you connect a Google or Microsoft account using an OAuth app you registered yourself, instead of SalesPartner's shared credentials.
Use this when:
- Your organisation's IT policy requires integrations to use company-managed apps
- Your Google Workspace or Microsoft 365 admin has not approved SalesPartner's shared app
- You want your own OAuth consent screen branding
- You need separate API rate limits and quotas for your organisation
Do not use this if you just want to connect an email account quickly — use the standard Google or Microsoft 365 options instead. Those require no setup on your end.
What You Will Need
- Admin access to Google Cloud Console (console.cloud.google.com) for Google, or Microsoft Entra admin centre (entra.microsoft.com) for Microsoft
- Permission to create and register OAuth applications in your organisation
- The SalesPartner redirect URI for your chosen provider (listed in the Redirect URIs section below)
Setting Up a Google OAuth App
Step 1 — Create a project
Go to console.cloud.google.com. Click the project selector at the top and select New Project. Name it (for example "SalesPartner") and click Create.
Step 2 — Enable the required APIs
In your project, go to APIs & Services > Library. Search for and enable:
- Gmail API
- Google Calendar API
Step 3 — Configure the OAuth consent screen
Go to APIs & Services > OAuth consent screen. Click Get Started.
- Choose Internal if this app is for users within your Google Workspace organisation only. Choose External if users outside your domain need access.
- Fill in App name, User support email, and Developer contact email.
- Click through and save. You do not need to manually add scopes — SalesPartner requests the required scopes automatically during sign-in.
Step 4 — Create OAuth credentials
Go to APIs & Services > Credentials. Click Create Credentials > OAuth client ID. Select Web application as the application type.
Under Authorised redirect URIs, add this exact URI:
https://api.salespartnercrm.com/api/v2/calendar-auth/google/calendar/callback
Click Create. Copy the Client ID and Client Secret shown — you will need both in the next step.
Step 5 — Connect in SalesPartner
In the SalesPartner admin panel, open the user. Go to the Integrations tab, find Connected Accounts, and click Add Account > Custom OAuth (BYOC).
Select Google as the provider. Paste your Client ID and Client Secret. Click Start OAuth.
A popup opens with the Google sign-in page. Sign in with the account you want to connect. The popup closes automatically when done.
Setting Up a Microsoft OAuth App
Step 1 — Register an application
Go to entra.microsoft.com. Navigate to Entra ID > App registrations and click New registration.
Enter a name (for example "SalesPartner Integration"). Under Supported account types, select:
- Accounts in this organisational directory only — for single-tenant (your org only)
- Accounts in any organisational directory — for multi-tenant (any Microsoft 365 tenant)
Under Redirect URI, select Web and enter this exact URI:
https://api.salespartnercrm.com/api/v2/calendar-auth/microsoft/calendar/callback
Click Register. On the Overview page, copy the Application (client) ID — this is your Client ID.
Step 2 — Add API permissions
In your registered app, go to API permissions > Add a permission > Microsoft Graph > Delegated permissions. Add:
- Mail.ReadWrite
- Mail.Send
- Calendars.ReadWrite
- User.Read
- offline_access
After adding all five, click Grant admin consent if you are an admin, or ask your admin to do so. All permissions must show a green granted status before the connection will work.
Step 3 — Create a client secret
Go to Certificates & secrets > New client secret. Give it a description and choose an expiry. Click Add.
Copy the Value immediately — it is only shown once. This is your Client Secret.
Step 4 — Connect in SalesPartner
In the SalesPartner admin panel, open the user. Go to the Integrations tab, find Connected Accounts, and click Add Account > Custom OAuth (BYOC).
Select Microsoft as the provider. Paste your Client ID and Client Secret. Click Start OAuth.
A popup opens with the Microsoft sign-in page. Sign in and grant the requested permissions. The popup closes automatically when done.
Redirect URIs Reference
Your OAuth app must have the correct redirect URI registered. Any mismatch will cause sign-in to fail with a redirect error.
Google: https://api.salespartnercrm.com/api/v2/calendar-auth/google/calendar/callback
Microsoft: https://api.salespartnercrm.com/api/v2/calendar-auth/microsoft/calendar/callback
Troubleshooting
"Admin approval required" (Microsoft) — Your Microsoft 365 admin has not granted consent for the delegated permissions. Ask them to go to the app registration in Entra ID, open API permissions, and click Grant admin consent.
"Redirect URI mismatch" — The URI registered in your app does not exactly match the URI above. Copy it from the Redirect URIs section and paste it directly — do not retype it.
"Access denied" or "Insufficient permissions" — One or more of the required API permissions is missing or admin consent has not been granted. Check all five permissions are added and show a green granted status.
Connection stops working after a period — Client secrets in Microsoft Entra have an expiry date. If your secret has expired, create a new one, then disconnect and reconnect the account in SalesPartner with the new secret.