Microsoft Graph Library for PHP.

Overview

Get started with the Microsoft Graph SDK for PHP

If your project uses the Microsoft Graph API, you should use this library to make it easier to implement with the Microsoft Graph API.
Documentation Microsoft Graph API: https://docs.microsoft.com/en-us/graph/api/overview?view=graph-rest-1.0

Install the SDK

You can install the PHP SDK with Composer, either run composer require manhdan/microsoftgraph, or edit your composer.json file:

"manhdan/microsoftgraph": "^1.0"

Configuration

You can publish MicrosoftGraph config and view files into your project by running:

php artisan vendor:publish --tag=microsoftgraph-config

You add the following properties to file .env:

MICROSOFT_GRAPH_CLIENT_ID=
MICROSOFT_GRAPH_TENANT_ID=
MICROSOFT_GRAPH_CLIENT_SECRET=
MICROSOFT_GRAPH_VERSION=

Get started with Microsoft Graph

Call Microsoft Graph using the v1.0 endpoint

The following is an example that shows how to call Microsoft Graph.

use Manhdan\Microsoft\Graph\Graph;

class ManhDanExample
{
    public function run()
    {
        $graph = new Graph();
        return $graph->withHeaders(['X-First' => 'foo'])->get('/users');
    }
}

Call Microsoft Graph using the beta endpoint

The following is an example that shows how to call Microsoft Graph.

use Manhdan\Microsoft\Graph\Graph;

class ManhDanExample
{
    public function run()
    {
        $graph = new Graph();
        return $graph->withHeaders(['X-First' => 'foo'])->onVersion('beta')->get('/users');
    }
}

Copyright and license

Copyright (c) ManhDanBlogs Corporation. All Rights Reserved. Licensed under the MIT [license].

You might also like...
php-echarts is a php library for the echarts 5.0.

php-echarts 一款支持Apache EChart5.0+图表的php开发库 优先ThinkPHP5/6的开发及测试。 Apache EChart5.0已经最新发布,在视觉效果、动画效果和大数据展示方面已经远超之前的版本; 故不考虑EChart5.0之前版本的兼容问题;建议直接尝试5.0+

Minimalist PHP frame for Core-Library, for Developing PHP application that gives you the full control of your application.

LazyPHP lightweight Pre-Made Frame for Core-library Install Run the below command in your terminal $ composer create-project ryzen/lazyphp my-first-pr

Gettext is a PHP (^7.2) library to import/export/edit gettext from PO, MO, PHP, JS files, etc.

Gettext Note: this is the documentation of the new 5.x version. Go to 4.x branch if you're looking for the old 4.x version Created by Oscar Otero http

Columnar analytics for PHP - a pure PHP library to read and write simple columnar files in a performant way.

Columnar Analytics (in pure PHP) On GitHub: https://github.com/envoymediagroup/columna About the project What does it do? This library allows you to w

:date: The VObject library for PHP allows you to easily parse and manipulate iCalendar and vCard objects

sabre/vobject The VObject library allows you to easily parse and manipulate iCalendar and vCard objects using PHP. The goal of the VObject library is

Small convention based CQRS library for PHP

LiteCQRS for PHP Small naming-convention based CQRS library for PHP (loosely based on LiteCQRS for C#) that relies on the MessageBus, Command, EventSo

Experimental library for forking PHP

Spork: PHP on a Fork ?php $manager = new Spork\ProcessManager(); $manager-fork(function() { // do something in another process! return 'Hel

Collection pipeline library for PHP

Knapsack Collection pipeline library for PHP Knapsack is a collection library for PHP = 5.6 that implements most of the sequence operations proposed

A PHP library to play with the Raspberry PI's GPIO pins
A PHP library to play with the Raspberry PI's GPIO pins

php-gpio php-gpio is a simple PHP library to play with the Raspberry PI's GPIO pins. It provides simple tools such as reading & writing to pins. [UPDA

Releases(v1.0.3)
Owner
Huỳnh Mạnh Dần
Beater Developer
Huỳnh Mạnh Dần
Microsoft Engage'21 Project.

Octocat Classes An online classroom web-application, making learning easy and reachable to all. both schools, universities and private tutors can make

Aditi Singh 2 Nov 27, 2021
Configure Magento 2 to send email using Google App, Gmail, Amazon Simple Email Service (SES), Microsoft Office365 and many other SMTP (Simple Mail Transfer Protocol) servers

Magento 2 SMTP Extension - Gmail, G Suite, Amazon SES, Office 365, Mailgun, SendGrid, Mandrill and other SMTP servers. For Magento 2.0.x, 2.1.x, 2.2.x

MagePal :: Magento Extensions 303 Oct 7, 2022
Dependency graph visualization for composer.json (PHP + Composer)

clue/graph-composer Graph visualization for your project's composer.json and its dependencies: Table of contents Usage graph-composer show graph-compo

Christian Lück 797 Jan 5, 2023
An object graph visualizer

print_o An object graph visualizer for PHP What is object graph ? Object-oriented applications contain complex webs of interrelated objects. Objects a

Akihito Koriyama 139 Jan 1, 2023
Shortest Path - have a function ShortestPath (strArr) take strArr which will be an array of strings which models a non-looping Graph.

Have the function ShortestPath(strArr) take strArr which will be an array of strings which models a non-looping Graph

null 1 Feb 5, 2022
Create eye-catching Open Graph images for each (or some) site pages

Open Graph Image Generator for Laravel Create Open Graph images (og:image, twitter:image, vk:image) for each (or some) site pages. Use page title to c

Pavel Bychko 4 Nov 11, 2022
Dobren Dragojević 6 Jun 11, 2023
Easy to use utility functions for everyday PHP projects. This is a port of the Lodash JS library to PHP

Lodash-PHP Lodash-PHP is a port of the Lodash JS library to PHP. It is a set of easy to use utility functions for everyday PHP projects. Lodash-PHP tr

Lodash PHP 474 Dec 31, 2022
PHP Text Analysis is a library for performing Information Retrieval (IR) and Natural Language Processing (NLP) tasks using the PHP language

php-text-analysis PHP Text Analysis is a library for performing Information Retrieval (IR) and Natural Language Processing (NLP) tasks using the PHP l

null 464 Dec 28, 2022