Download the PHP package ape-dev-de/microsoft-graph-sdk without Composer
On this page you can find all versions of the php package ape-dev-de/microsoft-graph-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ape-dev-de/microsoft-graph-sdk
More information about ape-dev-de/microsoft-graph-sdk
Files in ape-dev-de/microsoft-graph-sdk
Package microsoft-graph-sdk
Short Description Automatically generated sdk by openapi specifications
License
Informations about the package microsoft-graph-sdk
Microsoft Graph SDK for PHP
A production-ready PHP SDK for Microsoft Graph API, automatically generated from OpenAPI specifications with strict type-safe DTOs and request builder architecture.
Features
- ✅ Request Builder Architecture - Fluent, chainable API calls
- ✅ Strict Type-Safe DTOs - Full property validation and type hints with array support
- ✅ Array-like Collections - CollectionResponse implements ArrayAccess, Countable, and IteratorAggregate
- ✅ PSR-7/PSR-18 Compliant - Standard HTTP client integration
- ✅ Multiple Authentication Methods - Bearer token and Client Credentials flow
- ✅ Auto-generated from OpenAPI - Always up-to-date with Microsoft Graph API
- ✅ Symfony Serializer - Robust request/response handling
- ✅ Interactive Tinker Shell - REPL for debugging and exploration
Installation
Generate SDK
Run the generator script to download the OpenAPI spec and generate the SDK:
This will:
- Download the latest Microsoft Graph OpenAPI specification
- Generate strict DTOs and models
- Create request builder classes
- Set up authentication providers
- Format all code with PHP CS Fixer
Usage
Basic Setup with Bearer Token
Client Credentials Flow
Examples
Get Current User
List Users
Get Specific User
Create User
Update User
Delete User
Get User's Messages
Query Parameters
Collection Responses
All collection responses implement ArrayAccess, Countable, and IteratorAggregate for intuitive array-like behavior:
Array Properties
Model properties that are arrays are properly typed with PHPDoc annotations:
Interactive Tinker Shell
Debug and explore the Graph API with the interactive REPL:
Features:
- ✅ Arrow key history - Navigate previous commands with Up/Down
- ✅ Tab completion - Autocomplete commands
- ✅ Error handling - Errors don't crash the shell
- ✅ Keyboard shortcuts - Ctrl+D to exit, Ctrl+C to interrupt
Example session:
Architecture
Request Builders
Request builders provide a fluent API for constructing Graph API requests:
DTOs and Models
All models are strictly typed PHP classes generated from the OpenAPI specification:
- Full property type hints
- Getters and setters for all properties
- Validation support
- Serialization/deserialization via Symfony Serializer
Authentication
Two authentication providers are included:
- BearerTokenAuthenticationProvider - For pre-acquired access tokens
- ClientCredentialsAuthenticationProvider - OAuth 2.0 client credentials flow with automatic token refresh
Requirements
- PHP 8.1 or higher
- PSR-7 HTTP Message implementation
- PSR-18 HTTP Client implementation
- Symfony Serializer
Development
Regenerate SDK
To regenerate the SDK with the latest OpenAPI specification:
Extend Request Builders
You can extend the generated request builders to add custom functionality:
License
This SDK is auto-generated from Microsoft Graph OpenAPI specifications.
Author
Alexis Peters ([email protected])
All versions of microsoft-graph-sdk with dependencies
psr/http-client Version ^1.0
psr/http-factory Version ^1.0
psr/http-message Version ^1.0
symfony/property-info Version ^7.3
symfony/property-access Version ^7.3
phpdocumentor/reflection-docblock Version ^5.6
symfony/serializer Version ^7.3