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, a distinguished professional, boasts an impressive track record as a Microsoft MVP, having achieved this prestigious recognition for the eighth consecutive year since 2015. With an extensive career spanning over 18 years, Adnan has honed his expertise in various domains, notably excelling in SharePoint, Microsoft 365, Microsoft Teams, the .Net Platform, and Microsoft BI. Presently, he holds the esteemed position of Senior Microsoft Consultant at Olive + Goose. Notably, Adnan served as the MCT Regional Lead for the Pakistan Chapter from 2012 to 2017, showcasing his leadership and commitment to fostering growth within the tech community. His journey in the realm of SharePoint spans 14 years, during which he has undertaken diverse projects involving both intranet and internet solutions for both private and government sectors. His impact has transcended geographical boundaries, leaving a mark on projects in the United States and the Gulf region, often collaborating with Fortune 500 companies. Beyond his roles, Adnan is a dedicated educator, sharing his insights and knowledge as a trainer. He also passionately advocates for technology, frequently engaging with the community through speaking engagements in various forums. His multifaceted contributions exemplify his dedication to the tech field and his role in driving its evolution.

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