Forum Discussion

kpieta89's avatar
kpieta89
Copper Contributor
Jan 12, 2025

Access Sharepoint Online via Python without access to Azure AD

Hi

without going into details I would like to access the Sharepoint/OneDrive via Python using the Microsoft Graph API or Sharepoint REST API. 
As a first step, I understand that I need to register an app in the Azure Portal. 
The problem I am encountering (and I haven't found a similar issue during my research) is that I don’t have access to the Azure Portal—only the IT department in my company has access to it.

Is it still possible to access Sharepoint via the Microsoft Graph API or Sharepoint REST API without creating the app myself using my Microsoft account? Can IT create and register the app for me and then provide the client_id, client_secret, tenant_id, etc. (essentially a delegated app)? Or is it absolutely necessary for me to have an account in Azure?

I have zero experience working with Azure AD, apart from what I’ve read in the documentation and seen on YouTube.

  • luchete's avatar
    luchete
    Steel Contributor

    Hello,

    Yes, you can access SharePoint or OneDrive without registering the app yourself. Your IT department can create and configure the app in the Azure Portal, then provide you with the client ID, client secret, and tenant ID. Using these credentials, you can authenticate with a Python library like msal to get an access token. This token allows you to make API calls to SharePoint or OneDrive, either with application permissions (no user interaction needed) or delegated permissions (user login required).
    Hope it helps!

Resources