PHPackages                             mbdax/microsoftgraphbundle - 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. mbdax/microsoftgraphbundle

ActiveSymfony-bundle

mbdax/microsoftgraphbundle
==========================

Symfony2 bundle for API Micrososft

4911PHP

Since May 11Pushed 9y ago2 watchersCompare

[ Source](https://github.com/mbdax034/MicrosoftGraphBundle)[ Packagist](https://packagist.org/packages/mbdax/microsoftgraphbundle)[ RSS](/packages/mbdax-microsoftgraphbundle/feed)WikiDiscussions master Synced 6d ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

MicrosoftGraphBundle
====================

[](#microsoftgraphbundle)

Installation
------------

[](#installation)

### Add MicrosoftGraphBundle to your project

[](#add-microsoftgraphbundle-to-your-project)

The recommended way to install the bundle is through Composer.

```
$ composer require 'mbdax/microsoftgraphbundle:dev-master'
```

Configuration
-------------

[](#configuration)

You have to configure your api:

```
    microsoft_graph:
        client_id: "%client_id%"
        client_secret: "%client_secret%"
        redirect_uri: "name of your redirect route"
        time_zone: "" # your prefered timezone default UTC
        version: "" version of API GRAPH: #1.0 or beta,  deafault 1.0
        stateless: true # if false, the state will stored in session
        scopes:  # for more details https://developer.microsoft.com/en-us/graph/docs/authorization/permission_scopes
            - openid
            - offline_access
            #- ...

```

Get token from Office 365 | API Graph
=====================================

[](#get--token-from-office-365--api-graph)

```
    // Get client service
    $client= $this->get('microsoft_graph.client');
    try{
        /*
         if you have a refresh token then  the token will refresh
         */
        $client->getNewToken();

    }catch(\Exception $ex){
        // else
        $client->redirect(); // redirect to office 365 authentication page
    }
```

Example get events from outlook calendar
========================================

[](#example-get-events-from-outlook-calendar)

```
// Get calendar service
    $calendar= $this->get('microsoft_graph.calendar');

//Get a collection of Microsoft\Graph\Model\Event
    $startTime = new DateTime("first day of this month");
    $endTime = new DateTime("first day of next month");

    $events = $calendar->getEvents($startTime,$endTime);

//Get a  Microsoft\Graph\Model\Event
    $id='...'
    $event= $calendar->getEvent($id);

```

Create an event
===============

[](#create-an-event)

```

//  create Microsoft\Graph\Model\Event and set properties
 $newEvent= new Microsoft\Graph\Model\Event();
 $start= $calendar->getDateTimeTimeZone(new \DateTime('Now next minute'));
 $end= $calendar->getDateTimeTimeZone(new \DateTime('Now next hour'));

 $newEvent->setSubject('Controller Test Token');
 $newEvent->setStart($start);
 $newEvent->setEnd( $end);

 $event= $calendar->addEvent( $newEvent);

```

```
        dump($event);

```

Update an event
===============

[](#update-an-event)

```
    $id='...'
    $updateEvent= new Microsoft\Graph\Model\Event();
    $updateEvent->setId($id);
    $updateEvent->setSubject("I Forgot The Eggs!");
    $event= $calendar->updateEvent( $updateEvent);
```

Delete an event
===============

[](#delete-an-event)

```
    $id='...'
    $response= $calendar->deleteEvent( $id);
    dump($response->getStatus()==204?"Event deleted":$response);
```

### TODOS

[](#todos)

> Abstract Entities Documentation

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/7df0ff3b8f56416ced2a3c5b34372ecdc63e44a5e167beea54cfbac20a9c60a1?d=identicon)[mbdax034](/maintainers/mbdax034)

---

Top Contributors

[![mbdax034](https://avatars.githubusercontent.com/u/16877354?v=4)](https://github.com/mbdax034 "mbdax034 (19 commits)")

### Embed Badge

![Health badge](/badges/mbdax-microsoftgraphbundle/health.svg)

```
[![Health](https://phpackages.com/badges/mbdax-microsoftgraphbundle/health.svg)](https://phpackages.com/packages/mbdax-microsoftgraphbundle)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
