There are multiple ways to fetch the OneDrive URL for a user using User Profile through SharePoint Admin panel, through user properties from Microsoft 365 admin Center (also known as Office 365) and through PnP & SharePoint online PowerShell.

Using Microsoft 365 Admin Center

There are two ways to search from Microsoft 365 admin center.


  • From Admin center home page, enter user name in the search box. This will search all users, groups, settings and tasks.
  • Select the user from drop down, it will open the user details dialog right side.
  • Click on Access files link, it will show you the OneDrive URL for the current user. And if you do not have access then it will also assign you administrative access.


Follow below steps to get OneDrive URL access from active users list from Office 365 Admin Center:

  • From Office 365 Admin Center, click on active Users and search for the user, select user from the search result as shown in below screenshot.
  • User details will be shown on the right side. Click on OneDrive tab and you can get the option to Create Link to files, this will assign administrative access to User’s OneDrive.

Using SharePoint Admin Center

Follow below steps to get OneDrive URL from SharePoint Admin Center:

  • Log in to SharePoint admin and click on More Features, this will open the lead you to user profile service link. (in Old admin panel, User Profile link was listed on left navigation).
  • You might also need to use user profile page to provision OneDrive for a user and can also disable from here. Click Manage User Profile link on the page.
  • Now search by user name and select user profile from the list came from search result. From the search result, click on the menu item “Manage Personal Site” from the context menu.

Using SharePoint Online PowerShell

There are two ways to access OneDrive access for a user Using PowerShell:

SharePoint Online: PowerShell

I am not listing the full powershell script but you can use the blow cmdlets to access Onedrive for a User:

$userId = $ctx.web.EnsureUser("")
    #Get OneDrive Site URL from User Profile
    $peopleManger = New-Object Microsoft.SharePoint.Client.UserProfiles.PeopleManager($ctx)
    $profile = $peopleManager.GetPropertiesFor($userId.LoginName)
    Write-host $profile.PersonalUrl 

PnP PowerShell:

A simple PowerShell cmdlet from Pnp PowerShell can return you the OneDrive URL of the requested user:

Get-PnPUserProfileProperty -Account $userId | Select PersonalUrl

Adnan is six time Microsoft MVP (Since 2015) with over 16 years of extensive experience with major expertise on SharePoint, SharePoint based development, Microsoft 365, Microsoft Teams, .Net Platform and Microsoft BI. He is currently working Sr Microsoft Consultant at Olive + Goose. He is MCT Regional Lead for Pakistan Chapter since 2012. He is working on SharePoint for past 12 years and worked on different intranet/intranet solutions for private & govt. sector majorly in United states and Gulf region and have experience of working with multiple Fortune 500 companies. He is a trainer, technology evangelist and also speaks in community forums.

Leave a Reply

One reply on “Five ways to get OneDrive URL for a User in Microsoft 365”

  • László Juhász
    January 31, 2022 at 11:11 am

    Yours sincerely, Adnan Amin
    It could help you get the onedrive url. Not in SharePoint Admin Panel.
    I am an individual subscriber to hosting only.
    thanks to:
    László Juhász