Teams Sharing links – You don’t have access to this file

Today I had to troubleshoot a weird problem in Teams, our users are getting the error “You don’t have access to this file”, but they are members of the Team and there wasn’t any weird SharePoint permissions configured.

After some digging we found out that the file itself existed, users have access but the name of the file has changed.

Basically our users was sharing the link to the file by using Teams, get sharing link.

This is pretty normal thing to do, but Teams when generating this link is actually harcoding the path to the file with the “File name”, and when the file name changed the above link stop working and gave the error above.

This is a problem we had in SharePoint ages ago, where old link dies because of re-name or the file was moved.

The URL before file name change:

https://teams.microsoft.com/l/file/863B4E0E-23FD-41CF-865A-E1F44B8A4CED?tenantId=49de62be-5b4c-40a9-af7c-54059789c497&fileType=docx&objectUrl=https%3A%2F%2Fjh365dev.sharepoint.com%2Fsites%2FJHKontraktHndtering%2FShared%20Documents%2FGeneral%2FLorem%20ipsum.docx&baseUrl=https%3A%2F%2Fjh365dev.sharepoint.com%2Fsites%2FJHKontraktHndtering&serviceName=teams&threadId=19:9d252ac34e73440fb5e6db5e8d49a6a8@thread.skype&groupId=09d94a0b-ab40-46b4-ba37-dc95d7f2ad44

The URL after the file name change:

https://teams.microsoft.com/l/file/863B4E0E-23FD-41CF-865A-E1F44B8A4CED?tenantId=49de62be-5b4c-40a9-af7c-54059789c497&fileType=docx&objectUrl=https%3A%2F%2Fjh365dev.sharepoint.com%2Fsites%2FJHKontraktHndtering%2FShared%20Documents%2FGeneral%2FLorem%20ipsum1.docx&baseUrl=https%3A%2F%2Fjh365dev.sharepoint.com%2Fsites%2FJHKontraktHndtering&serviceName=teams&threadId=19:9d252ac34e73440fb5e6db5e8d49a6a8@thread.skype&groupId=09d94a0b-ab40-46b4-ba37-dc95d7f2ad44

Until this issue is adressed by Microsoft, you might want to instruct your users to use the “SharePoint link” instead of Teams, the SharePoint link will work as long as the file still is in the same Team.

PS! The above error will also occur if the file is inside a folder and the folder name changes.

Cheers

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s