german_wings
german_wings

Reputation: 54

OneDrive Personal Daemon Api Access

I have a Personal OneDrive Account Purchased (not Free Tier).

What am I trying to do ?

To write a Daemon in Python that will connect to OneDrive Personal Account Folders and upload / show contents.

What did I tried doing ?

I learned Microsoft Graph is the way to go to access all personal business accounts.

Problem ?

I cannot authenticate myself properly , since my application will be a Daemon I can't present myself a Login Page with redirect URLs so "Code Flow" type of Acquiring Authentication Token for Personal Accounts will not work for me as mentioned in the Tutorials.

Also if I forcefully query /me it says "Please use consumer endpoint" if I change the Authentication Endpoint it says invalid Client ID and Credentials (Because I think that onmicrosoft.com principal name cannot be used to query OneDrive Personal which belongs to [email protected] )

What do I request ?

An idea of how would others implement this daemon with brief if not detailed steps of configuration in Azure and Code , if possible a Sample code and an Algorithm.

I am new bla bla....hehe , actually I am new to Azure and is also using OAuth First Time. Thanks in advance. I will edit the question if someone needs more information on this to help me.

Upvotes: 1

Views: 749

Answers (1)

Allen Wu
Allen Wu

Reputation: 16498

You cannot use daemon to access personal account OneDrive files.

Daemon app will use Application permission (without user) to do the operation.

But based on the Microsoft Graph Get Files Permissions, Only Delegated permission is supported for personal Microsoft account. And Delegated Permission means app + user permission.

enter image description here

Currently you have to implement Get access on behalf of a user and use auth code flow to access personal account OneDrive files with Microsoft Graph API.

Upvotes: 3

Related Questions