Opening, sharing, and managing OneDrive-stored documents directly within Microsoft Teams
Hi Komal Bagai
Based on your description and the error message shown in your screenshot, this appears to be related to a legacy SharePoint user account that is still associated with the affected site. This can happen if a user account was previously deactivated or recreated using the same email address, as SharePoint may still retain a reference to the previous account.
In this case, I recommend asking your SharePoint Administrator or Global Administrator to run Microsoft's Site User ID Mismatch diagnostic. You can find more information here: Fix site user ID mismatch in SharePoint or OneDrive - SharePoint | Microsoft Learn
The administrator will need the affected user's email address and the URL of the affected SharePoint site.
If the issue persists, the SharePoint Administrator or site owner may need to:
-Remove the old (legacy) user account from the affected SharePoint site's permissions or User Information List (UserInfo).
-Grant permissions to your current account again.
-Ask you to sign out of Microsoft 365, sign back in, and then test access to the affected files.
For more information, you may also refer to: Remove users from SharePoint - SharePoint in Microsoft 365 | Microsoft Learn
If your IT administrator needs further assistance or would like Microsoft to investigate the issue further, they can open a support request through the Microsoft 365 admin center. This is the recommended approach for scenarios involving recreated accounts or SharePoint User ID mismatches that require further investigation.
For detailed instructions on how to get support, please refer to Get support - Microsoft 365 admin | Microsoft Learn.
I hope this helps clarify the situation.
If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in the forum documentation to enable e-mail notifications if you want to receive the related email notification for this thread.