PHPackages                             yosefa/microsoft-graph-api-php - 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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. yosefa/microsoft-graph-api-php

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

yosefa/microsoft-graph-api-php
==============================

Currently a simple utility for login using microsoft graph api php.

1.0.3(3y ago)119MITPHPPHP &gt;=7.2

Since Aug 4Pushed 3mo ago1 watchersCompare

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

READMEChangelogDependencies (1)Versions (2)Used By (0)

Microsoft Graph API PHP Library
===============================

[](#microsoft-graph-api-php-library)

Description
-----------

[](#description)

A lightweight PHP library for authenticating and retrieving user data from Microsoft Graph API using OAuth 2.0. This library simplifies the process of obtaining access tokens and fetching user information through Microsoft's authentication system.

Features
--------

[](#features)

- Easy Microsoft OAuth 2.0 authentication.
- Token retrieval and management.
- Fetch user profile information.
- Supports multiple tenants and scopes.
- Built with Guzzle HTTP client and Microsoft Graph SDK.

Prerequisites
-------------

[](#prerequisites)

- PHP 7.4+
- Composer
- Microsoft Azure Active Directory application credentials

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

[](#installation)

Install the library using Composer:

```
composer require yosefa/microsoft-graph-api-php
```

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

[](#configuration)

1. Create a Microsoft Azure AD application in the Azure Portal
2. Obtain the following credentials:
    - Client ID
    - Client Secret
    - Tenant ID
    - Redirect URI

Usage Example
-------------

[](#usage-example)

```
