PHPackages                             ape-dev-de/microsoft-graph-sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. ape-dev-de/microsoft-graph-sdk

ActiveLibrary[API Development](/categories/api)

ape-dev-de/microsoft-graph-sdk
==============================

Automatically generated sdk by openapi specifications

0.1.13(6mo ago)0132PHPPHP ^8.1CI failing

Since Oct 23Pushed 6mo agoCompare

[ Source](https://github.com/ape-dev-de/php-microsoft-graph-sdk)[ Packagist](https://packagist.org/packages/ape-dev-de/microsoft-graph-sdk)[ RSS](/packages/ape-dev-de-microsoft-graph-sdk/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (15)Versions (15)Used By (0)

Microsoft Graph SDK for PHP
===========================

[](#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
--------

[](#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
------------

[](#installation)

```
composer install
```

Generate SDK
------------

[](#generate-sdk)

Run the generator script to download the OpenAPI spec and generate the SDK:

```
php generate.php
```

This will:

1. Download the latest Microsoft Graph OpenAPI specification
2. Generate strict DTOs and models
3. Create request builder classes
4. Set up authentication providers
5. Format all code with PHP CS Fixer

Usage
-----

[](#usage)

### Basic Setup with Bearer Token

[](#basic-setup-with-bearer-token)

```
