API accounts: Google and Microsoft connection
How to add a Google or Microsoft 365 account for storage and mail connections, authorise access, and disconnect it.
The API accounts menu holds the external accounts through which the system reaches Google Drive, Gmail or Microsoft 365 storage and mail. After an account is added, access has to be authorised once on the Google or Microsoft page.
Before you start
- A Google OAuth or Microsoft account needs a client ID and secret from the provider's developer console.
- For a Microsoft account, register the Redirect URI (Azure) shown on the form EXACTLY like that in the Azure app; any difference causes an error.
- A Google service account needs the credentials JSON file downloaded from Google.
Adding and connecting an account
- Open Master datas (Google / AI / WIP) → API accounts and click the blue + button at the top right.
- Enter Account Name (1–255 characters), choose Provider (Google or Microsoft) and Auth type.
- Fill in Client ID (required) and Client secret; for Microsoft also Tenant and Scopes.
- If the account may only work inside one folder, enter the path in Root folder (restriction); if empty, the whole drive is available.
- For a service account upload the JSON file under Credentials.
- Click Save.
- In the list click Connection in the account's row. The Google or Microsoft consent page opens in a new window; sign in and allow access. On success the account becomes active.
Managing the connection
- The Disconnection button deactivates the account and deletes the stored access token; reconnect it with Connection.
- For a service account, starting it opens the Drive connection and sets the account active.
- The Drive folder sync refreshes the folder list; the result reads, for example: "Google Drive folders synced! Inserted: 12, Updated: 3, Errors: 0".
Messages and warnings
- "Warning: Missing name!" and "Warning: Missing Client ID!"
- "Only a JSON file can be uploaded!" — "This file already exists!" (the system does not overwrite an existing file).
- For Microsoft, if the account is not found or its provider is not Microsoft: "Microsoft account not found".
The red bin button in the header deletes the account without any check: it does not look at whether documents or mailboxes use it. Before deleting, make sure nothing depends on the account any more.
Example
Sample Ltd. keeps its documents on its own Google Drive, but only inside the "Shared" folder. A Google OAuth account named "Sample Drive" is added with "Shared" in Root folder (restriction), and the company's administrator allows access with the Connection button. From then on the system lists, uploads and creates subfolders only inside this folder.