If two users are editing the same file in shared OneDrive at the same time, OneDrive will allow both users to make changes to the file simultaneously. However, the changes made by each user will be saved as separate versions of the file.
When a user saves changes to a file in OneDrive, the new version of the file is uploaded to the cloud and replaces the previous version. If another user is working on the same file at the same time, they may not see the changes made by the first user until they refresh the file or open it again.
If there are conflicts between the changes made by the two users, OneDrive will prompt them to resolve the conflict by choosing which version of the file to keep. OneDrive may also create a copy of the file with a different name to avoid overwriting any changes.
To avoid conflicts, it’s a good idea to communicate with other users about who will be editing the file and when. You can also use the “Version History” feature in OneDrive to view previous versions of the file and restore an earlier version if needed.