apility/microsoft-graph-api
A Laravel/PHP package that wraps the Microsoft Graph API, giving your application a convenient way to query Microsoft 365 services such as users, mail, calendars, and files.
composer require apility/microsoft-graph-api. Since this is a release candidate, pin it explicitly (e.g. "apility/microsoft-graph-api": "1.0.0-RC4") so a later RC doesn't silently change behaviour under you.php artisan vendor:publish — check the service provider for the actual tag; it varies), then map the config values to .env. You will typically need a tenant ID, client ID, and client secret from an Azure AD app registration.MailService, CalendarService, UserSyncService) that depend on the package client. Your application code then depends on your interfaces, and you can swap endpoints, add retries, or mock in tests without touching call sites.$select to keep payloads small and jobs fast.$select aggressively. Graph returns fat objects by default. Requesting only the fields you need is the single biggest performance win in day-to-day usage.@odata.nextLink; loop until it's absent rather than assuming one page.$batch endpoint is useful for many small operations, but keep batches modest — one failing sub-request shouldn't sink a large job.$select, and payload — not just the response.429 with a Retry-After header. Implement exponential backoff and honour that header; naive retry loops make throttling worse.v1.0 and beta behave differently, and beta is explicitly unstable. Default to v1.0 and only opt into beta for specific features — don't let beta leak into everything.expires_in; a token that expires mid-request produces confusing intermittent failures..env values, run php artisan config:clear. Stale cached config is a classic "I changed the secret and it still fails" trap.PUT uploads cap out around 4 MB; anything larger requires a resumable upload session.composer.json, and run your integration tests against a real tenant after each bump.How can I help you explore Laravel packages today?