How to Co-Author a SharePoint Word Document Programmatically
Question details
The user is looking for ways to allow multiple users to edit a Word document stored in SharePoint simultaneously, specifically addressing programmatic access methods.

- Product
- SharePoint, Microsoft Word
- Device & OS
- not provided
- Scenario
- Setting up concurrent editing for a Word document hosted in a SharePoint library, often involving custom C# applications or automated document workflows.
- Observed behavior
- Programmatic co-authoring requires the correct combination of SharePoint edit permissions and the proper programmatic method (like C# authentication and file-opening protocols) to avoid locking the file exclusively.
Ensure that your SharePoint site settings explicitly allow for document co-authoring and that all participating users have active Microsoft 365 accounts with the necessary library permissions.
Grant Edit Permissions via SharePoint UI
Before attempting programmatic access, you must ensure the baseline permissions allow for concurrent editing through the SharePoint interface.
Open your SharePoint site and go to the Document Library where the Word document is stored.
Hover over the target Word document and click the 'Share' icon (or click the three dots and select Share).
Enter the email addresses of the users who need access. Ensure the permission dropdown is set to 'Can edit'.
Click 'Send' to grant edit permissions. Users can now open the document concurrently and utilize native Word co-authoring.

Troubleshoot Programmatic C# Access
Review your C# implementation and authentication flow to ensure your application doesn't accidentally lock the file, preventing co-authoring.
Collaborate Seamlessly with WPS Office
Looking for a cost-effective way to handle collaborative document editing? WPS Office provides a robust, lightweight, and free alternative to Microsoft Office, offering high compatibility with Word formats and built-in team collaboration tools.
- 1. Download and Install: Get WPS Office for free from the official website and install it on your device.
- 2. Open Your Document: Launch WPS Writer and open your standard .docx or .doc files seamlessly.
- 3. Share and Collaborate: Use the built-in WPS Cloud sharing features to invite team members and collaborate on documents effortlessly.

Frequently Asked Questions
Why is my SharePoint document locked for editing by another user?
This usually happens if a user opens the document in an older version of Office that doesn't support co-authoring, or if they have manually checked out the document exclusively in the SharePoint library settings.
Can I force co-authoring using the SharePoint REST API?
Co-authoring itself is a client-side feature handled by Microsoft Word. While you can use the REST API or Graph API to manage permissions and read file metadata, concurrent real-time editing requires users to open the file in a supported Word desktop client or Word for the Web.
Does co-authoring work with macro-enabled Word documents (.docm)?
Co-authoring has limited support and frequent synchronization issues with macro-enabled documents. It is highly recommended to use standard .docx formats for seamless real-time collaboration.




