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 two time SharePoint MVP (Most Valuable Professional) with over 12 years of extensive experience with major expertise on SharePoint Server, Office 365, .Net Platform and Microsoft BI. He is currently working SharePoint Architect at FMT Consultants. He is MCT Regional Lead for Pakistan Chapter since 2012. He is working on SharePoint for past nine years and worked on different intranet/intranet solutions for private & govt. sector majorly in Gulf region, which include OOB and customized solutions. He is a trainer, technology evangelist and also speaks in community forums.

Leave a Reply