Has anyone implemented a document management solution alongside Microsoft 365 or Google Workspace?
Loading
Has anyone implemented a document management solution alongside Microsoft 365 or Google Workspace?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Ajay BansodePosted Aug 22, 2025, 11:39 AM
2) Google Workspace (Google Drive) via Drive API (.NET)
What this demo does
Authenticates with a service account using domain-wide delegation
Uploads a file to a Shared Drive / folder
Sets metadata (name, description, custom properties)
Shares the file (adds a permission)
Lists revisions (versions)
Setup (once)
Create a Google Cloud project → Enable Drive API.
Create a Service Account, download the JSON key.
In Google Workspace Admin, grant Domain-wide delegation to the SA for scope:
https://www.googleapis.com/auth/driveShare your target Shared Drive / folder with the service account or impersonate a user with access.
We’ll impersonate an admin/user via
UserEmailToImpersonate.NuGet
Code (Console app)
Notes
Custom metadata on Drive is best stored in
properties(key/value). For robust schemas, keep a parallel DB (SQL) and store the Drive fileId there.If using Shared Drives, ensure the impersonated user has access to that drive and
supportsAllDrives=trueon certain calls (if needed).Choosing Between M365 & Google
Need tight records management, retention, Power Automate workflows → SharePoint/Graph is usually stronger.
Need cross-platform simple storage/sharing with lightweight metadata → Drive API is quick to wire up.
Ajay BansodePosted Aug 22, 2025, 11:38 AM
1) Microsoft 365 (SharePoint/OneDrive) via Microsoft Graph
What this demo does
Authenticates app-only (daemon) with Azure AD
Uploads a file to a SharePoint Document Library folder
Writes metadata (columns) to the associated ListItem
Reads version history
Setup (once)
Register an app in Entra ID (Azure AD):
Authentication: Application (client credentials).
API permissions (Application):
Sites.ReadWrite.All,Files.ReadWrite.All(grant admin consent).Get: Tenant ID, Client ID, Client Secret.
Find your Site ID and Drive ID (document library). Easiest: open the library in SharePoint → Graph Explorer can reveal IDs, or use the
sites?search=endpoint once.NuGet
Code (Console app)
Notes
Create your custom columns in the document library first (same internal names used in
FieldValueSet).For approvals, wire a Power Automate flow to the library and trigger on create/update, or call a flow HTTP endpoint from C# (p zremium connector) to start approvals programmatically.