OneDrive API: files, folders and sharing with AI agents
OneDrive is accessed by API through Microsoft Graph, which lets you list, read, upload, search and share files in OneDrive and SharePoint. Companies on Microsoft 365 use it to automate documents. Access is through an app registered in Microsoft Entra ID, with administrator consent.
What the OneDrive API offers
Files and folders
List, read, move, rename and delete items.
Upload and download
Send and download files, including large ones, in parts.
Search
Find files by name and content.
Sharing
Create links and set access permissions.
Changes
Track what changed in a folder since the last query.
SharePoint
Access the document libraries of sites with the same logic.
How to access the OneDrive API
- With your company’s credentialsOAuth 2.0 with an app registered in Microsoft Entra ID and Graph file permissions; application permissions require administrator consent.
- Application permissions give broad access: restrict them to the minimum.
- Microsoft Graph has request limits.
- Be careful with external sharing links.
Official documentation: learn.microsoft.com/onedrive/developer
What an iTeam agent does with the OneDrive API
Organizing incoming documents
The agent saves e-mail attachments in the right customer folder, with a standard name.
Search for the team
An employee asks in Teams and the agent finds the right contract or proposal.
Sharing review
The agent lists old public links and asks for approval to revoke them.
Building case files
The agent gathers the documents of a process into one folder and shares it with the auditor after approval.
From the credential to the agent at work, with approval
Register the app in Entra ID
Create the registration and grant only the file permissions needed, preferably limited to specific sites and folders.
iTeam vault
Store the secret or certificate in the vault and define, per agent, the folders and actions allowed.
Approval to share
External sharing and deletions require human approval, with an audit trail.
Ready-made AI teams for this work
Management reporting team
Revenue, margin, pipeline and cash in one report, built from your systems, with a short note on what changed and why.
Inventory planning team
Stock, sales and lead times are checked every day. You get a reorder list per SKU and a warning about what is not selling.
Procurement and quotes team
Requests go out to suppliers, quotes come back into one table, and the approver sees price, terms and past orders before saying yes.
Logistics and deliveries team
Routes, drivers and delivery status in one place, with customers told about delays before they have to ask.
Questions about the OneDrive API
Is the OneDrive API free?
In general, Microsoft Graph does not charge for common file calls; storage follows your Microsoft 365 license.
Do I need to write code to use the OneDrive API with iTeam?
Not necessarily. iTeam's HTTP tool reads the API documentation and learns the endpoints, and the deployment team sets up credentials, permissions and tests with you.
Is the OneDrive API the same as Microsoft Graph?
Yes. Current API access to OneDrive and SharePoint goes through Microsoft Graph.