/m365:filesfrom m365
Investigates OneDrive and SharePoint file access, sharing permissions, storage quotas, and file search via Microsoft Graph /drives endpoint. Useful for M365 file troubleshooting and offboarding transfers.
Ships in m365. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Microsoft 365 provides two file storage surfaces: OneDrive (personal, per-user) and SharePoint (team/department libraries). Both are accessible through the same Microsoft Graph /drives endpoint. MSP support tasks include investigating access issues, checking storage quotas, managing sharing permissions, and transferring file access during offboarding.
backup-pack or kaseya/datto-saas-protection.kaseya/it-glue or hudu.m365-security or cipp.| Surface | Use | Graph Resource |
|---|---|---|
| OneDrive Personal | Individual user's documents | /users/{id}/drive |
| SharePoint Site Drive | Team/department files | /sites/{id}/drives |
| SharePoint Library | Document library within a site | /drives/{driveId} |
GET /v1.0/users/{userId}/drive?$select=id,name,quota
Response:
{
"id": "drive-guid",
"name": "OneDrive",
"quota": {
"used": 5368709120,
"remaining": 1127428915200,
"total": 1132797624320,
"state": "normal"
}
}
state values: normal, nearing, critical, exceeded
GET /v1.0/users/{userId}/drive/root/children?$select=id,name,size,lastModifiedDateTime,webUrl,folder,file
GET /v1.0/users/{userId}/drive/items/{folderId}/children?$select=id,name,size,lastModifiedDateTime,webUrl
GET /v1.0/users/{userId}/drive/root/search(q='budget 2024')?$select=id,name,parentReference,lastModifiedDateTime,webUrl
GET /v1.0/drives/{driveId}/items/{itemId}/permissions
Response includes:
{
"value": [
{
"id": "perm-id",
"roles": ["write"],
"grantedToV2": {
"user": { "displayName": "Bob Manager", "email": "[email protected]" }
},
"link": null
},
{
"id": "link-id",
"roles": ["read"],
"link": {
"type": "view",
"scope": "anonymous",
"webUrl": "https://contoso-my.sharepoint.com/..."
}
}
]
}
POST /v1.0/drives/{driveId}/items/{itemId}/createLink
Content-Type: application/json
{
"type": "view",
"scope": "organization"
}
type: view, edit, embed
scope: anonymous, organization, users
POST /v1.0/drives/{driveId}/items/{itemId}/invite
Content-Type: application/json
{
"requireSignIn": true,
"sendInvitation": false,
"roles": ["read"],
"recipients": [
{ "email": "[email protected]" }
],
"message": "Shared as part of employee transition"
}
DELETE /v1.0/drives/{driveId}/items/{itemId}/permissions/{permissionId}
Grant another user access to the departing employee's entire OneDrive:
POST /v1.0/users/{departingUserId}/drive/root/invite
Content-Type: application/json
{
"requireSignIn": true,
"sendInvitation": false,
"roles": ["write"],
"recipients": [{ "email": "[email protected]" }]
}
Full ownership transfer (changing site admin) requires SharePoint admin PowerShell:
Set-SPOSite -Identity <url> -Owner <email>
GET /v1.0/sites?search=*&$select=id,displayName,webUrl,createdDateTime
GET /v1.0/sites/{siteId}/drives?$select=id,name,driveType,quota
GET /v1.0/drives/{driveId}/root/children?$select=id,name,size,lastModifiedDateTime,webUrl
GET /items/{id}/permissionsGET /users/{id}/memberOf/inviteBefore offboarding, identify files the user owns that are widely shared:
GET /v1.0/users/{userId}/drive/root/search(q='*')?$select=id,name,permissions,parentReference
Look for items with scope: anonymous sharing links — these should be cleaned up or ownership transferred.
Check users approaching quota limits:
GET /v1.0/users/{userId}/drive?$select=quota
If quota.state is nearing (>80%) or critical (>90%), alert for cleanup or quota increase.
| Error | Cause | Resolution |
|---|---|---|
itemNotFound | File or folder doesn't exist | Check path or item ID |
accessDenied | No Files.Read permission | Grant permission and admin consent |
quotaLimitReached | OneDrive full | Clean up or expand quota |
sharingDisabled | Tenant sharing policy blocks external | Review SharePoint admin settings |
| Task | Microsoft Graph Permission |
|---|---|
| Read user's files | Files.Read.All |
| Read/write files | Files.ReadWrite.All |
| Read SharePoint sites | Sites.Read.All |
| Manage sharing | Files.ReadWrite.All |
| SharePoint admin | Sites.ReadWrite.All |
What SKILL.md sets; muted values are Claude Code's defaults
When investigating M365 file access, sharing, storage-quota, or file-search issues across OneDrive and SharePoint. Use when: onedrive, m365 files, sharepoint files, onedrive quota, file sharing m365, onedrive permissions, m365 storage, find file m365, onedrive access, or sharepoint document library.
Three short reads, in order
8 skills in this plugin
/api-patternsMicrosoft 365 API PatternsMicrosoft Graph fundamentals shared by every M365 skill: Entra token scopes and the per-request Bearer model, OData query operators and filter syntax, @odata.nextLink pagination, delta queries for incremental sync, 429 throttling and retry behavior, JSON batching, and the common Graph error codes.
/calendarMicrosoft 365 CalendarExchange Online calendars through Microsoft Graph: event retrieval and date-range queries, free/busy and availability lookup, meeting and Teams-meeting creation, room and equipment resource bookings, calendar permissions, and the Graph scopes and error causes involved.
/licensingMicrosoft 365 LicensingThe M365 subscription → SKU → service-plan model, seat availability versus consumption, assigning and removing licenses through Graph, the audit workflow for finding unused or misallocated seats, common SKU GUIDs, and licensing error causes.
/mailboxesMicrosoft 365 MailboxesExchange Online mailboxes through Microsoft Graph: the four mailbox types and how they differ, message listing and search, inbox rules, out-of-office and forwarding, mailbox size and quota, shared-mailbox access management, and mail flow diagnostics.
/securityMicrosoft 365 SecurityThe M365 tenant security checks that distinguish a secure tenant from a vulnerable one: per-user authentication-method inspection for real MFA enrollment, sign-in risk and risky users, suspicious inbox rules, legacy authentication exposure, conditional access coverage, Secure Score, and the indicator set for a compromised account.
/teamsMicrosoft 365 TeamsMicrosoft Teams through Microsoft Graph: the Team/Channel/Member/Meeting/Tab object model, team and channel enumeration, membership and ownership changes, online meetings, usage reporting, and the causes behind Teams access failures.
npx claudepluginhub wyre-ai/msp-claude-plugins --plugin m365Other plugins' skills for the same job