0

I'm trying to access my licensed Microsoft 365 Personal OneDrive using Microsoft.Graph.

I have an application registration setup in Active Directory for my tenant (xxxx.onmicrosoft.com) with the appropriate application permissions (Files.Read.All, User.Read.All).

I login with my Microsoft account with a personal email (xxxx@gmail.com) which is mapped to the AD user admin@xxxx.onmicrosoft.com. I am able to use the confidential client in a dotnet console app to get a token and access OneDrive for my user in Active Directory.

However, instead of seeing my OneDrive, the drive I see seems to be a OneDrive for Business (xxxx-my.sharepoint.com/personal/admin_xxxx_onmicrosoft_com/Documents) that is not my personal one. That one seems to be mapped directly to the admin@xxxx.onmicrosoft.com and not my personal email login.

Is there something I'm missing here?

scottrudy
  • 1,633
  • 1
  • 14
  • 24
  • xxxx-my.sharepoint.com/personal/ is a Personal OneDrive. xxxx.sharepoint.com/site is the Business equivalent. You can try this with Microsoft Graph Explorer – codeye Nov 07 '22 at 13:58
  • xxx-my.sharepoint.com/personal is OneDrive for a business subscription. I have several business accounts and have verified this. Personal OneDrive accounts are located at onedrive.live.com/?id=root&cid=XXXX. I happen to have a paid personal Office account, but I can't seem to get to the data via Graph. – scottrudy Nov 08 '22 at 23:09
  • Sorry Scott you are correct! I just checked with Microsoft graph and I can access my personal account with the onedrive.live.com/?id=root&cid=XXXX setup. Running the https://graph.microsoft.com/v1.0/me/drive/recent query returns the correct information. – codeye Nov 09 '22 at 03:14

1 Answers1

0

MS Graph is an API exposed to query the M365 platform. I doubt whether you can connect to the personal OneDrive using it.

The article explains how to connect & modify queries. Might be worth checking it out. Working with MS Graph Explorer

  • I do have a paid, personal M365 account though. It just all seems like a bandaged link between personal free OneDrive and M365 OneDrive. At some point I decided I wanted to upgrade my storage and moved to a full office subscription. An M365 Business subscription is like $3 more than the personal one, so I may just explore how I can move to that. – scottrudy Nov 08 '22 at 23:16