Shared documents inaccessible to new user with same UPN

Kato Baade 21 Reputation points
2022-06-16T10:53:15.537+00:00

This might be a simple answer, but we've been scratching our heads for some time over this.
An employee of ours quit in February of last year. This user had a good amount of documents shared to their account which was deleted upon the user leaving the org.
This same employee rejoined the org later the same year, around October or so. He rejoined, got a new user account.
The issue arised when users attempted sharing files with the new user account.

  • If a user who hasn't previously shared anything with the previous user account attempts to share a file with the new user account, this works as intended. The user recieves a mail, can open the document and work as intended by the one sharing.
  • However, the users who have shared files with the user previously (that is, before the original account was deleted) cannot share files with the new user account. The user seems to recieve a mail, but is met with an error stating "This link is not available to you."

When looking at the sharing settings, if I, who haven't shared a file with this user's previous account, share a file, it is listed as shared with his primary email address (name.surname@org .name), but the users who attempt sharing anything with the new user will see the user listed as a onmicrosoft-address (username@tenant .onmicrosoft.com)
My theory is that the user has, somehow, remains of the "old" account left somewhere, but I cannot find the user in any way when looking up the onmicrosoft-address. I've tried looking in AAD and tried using PowerShell to see if I can see anything the AAD gui doesn't pick up.
Does anyone have anything smart I can try? Thanks in advance :-)
( Apologies if the formatting is a bit weird or the grammar is somewhat off, English is my second language :p)

OneDrive Management
OneDrive Management
OneDrive: A Microsoft file hosting and synchronization service.Management: The act or process of organizing, handling, directing or controlling something.
1,118 questions
{count} votes

Accepted answer
  1. Emily Nelson 126 Reputation points
    2022-09-19T21:51:25.07+00:00

    Kato, this is a PUID mismatch issue most likely and it's just like you suspect; the old account is interfering with the new one. If you go to the admin portal and start the creation of a new support ticket, you'll have the opportunity to use the diag tool. Enter in "Diag: Check SharePoint User Access" (submit) then fill in the form and let the diag tool check. You'll likely get this response back:

    242685-image.png

    It's not a solution but it will give you the chance to create a ticket. Everything I've seen online shows it's PUID issue that will require Microsoft run a script on their end to clean it up. Unfortunately, I've had a ticket open for 3 months on this issue and they have been unable to resolve it.

    0 comments No comments

4 additional answers

Sort by: Most helpful
  1. Steve Cox (Galliford Try) 5 Reputation points
    2023-10-12T09:54:27.51+00:00

    The problem (I've got this happening at the moment) is that the user that left and re-joined, had files shared with him, so he was added to the OneDrive Site Collection Permissions / SharePoint site level permissions, however that will be linking to the "OLD" object. When a new file share is made, the site looks at the permissions, sees that the UPN already has access so nothing new is added. The link won't work. If from 365 Admin, you go to User > Active Users, search for your employee, click OneDrive and generate the URL, when you click it to get into his OneDrive, the URL will finish something like Joe_bloggs@domainname.co.uk1, this is the definitive confirmation that the account was closed and then a new account with same UPN is in use.

    To resolve - You need to go to the shared file(s) location, modify the URL so that it looks like this:

    OneDrive for Business:

    https://companyname-my.sharepoint.com/personal/joe_bloggs_companyname_co_uk/_layouts/15/people.aspx?membershipgroupid=0

    SharePoint Online:

    https://company.sharepoint.com/sites/sitename/_layouts/15/people.aspx?membershipgroupid=0

    This page will show you the Site Collection Permissions, find the employee that left and came back and remove them. Then, any new shares from that location, will be fine. It would need to be done for each location, anyone that has shared from OneDrive will need to do this, any SharePoint site would need to have this done by a SPO admin.

    1 person found this answer helpful.
    0 comments No comments

  2. Curtis Smithson 1 Reputation point
    2023-01-10T10:05:45.383+00:00

    Is there any update on this? I am currently facing the same issue with a user


  3. Rogers, Richard 0 Reputation points
    2023-01-19T15:43:19.17+00:00

    This fixed the issue for me.

    Run the following PowerShell commands

    1. Connect-SPOService (enter the url for your SharePoint admin sight when prompted and sign in with your admin credentials)
    2. Remove-SPOUser -LoginName <UPN of user the files are shared with> -Site <URL of the OneDrive location for person trying to share>
      Example: Remove-SPOUser -LoginName username@something.com -Site https://something-my.sharepoint.com/personal/username_company_com

    You must be a SharePoint admin and you must be a site collection administrator of the sharing user's OneDrive account.

    0 comments No comments

  4. Hernandez, Jose 0 Reputation points
    2023-07-20T15:16:53.19+00:00

    If its only certain users (not everyone) having the issue. Have the user navigate to the URL:
    https://COMPANY-my.sharepoint.com/personal/FIRST_LAST_COMPANY_com/_layouts/15/people.aspx?MembershipGroupId=0&FilterField1=ContentType&FilterValue1=Person

    They will need to change the COMPANY, FIRST, and LAST info to your values.

    From this screen they can find and delete the old user. Then try to share again.
    User's image

    0 comments No comments