PHPackages                             miguel\_costa/office365api - 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. miguel\_costa/office365api

AbandonedArchivedLibrary

miguel\_costa/office365api
==========================

First test of connection to Microsoft Graph API 1.0

1.0(9y ago)62762MITPHPPHP ~5.6|~7.0

Since Sep 5Pushed 9y ago2 watchersCompare

[ Source](https://github.com/mgcostaParedes/Office365-API-Oauth2-Laravel)[ Packagist](https://packagist.org/packages/miguel_costa/office365api)[ Docs](https://github.com/Miguel_Costa/Office365API)[ RSS](/packages/miguel-costa-office365api/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (5)Versions (2)Used By (0)

Office 365 Graph API Connection Oauth2 Laravel 5
================================================

[](#office-365-graph-api-connection-oauth2-laravel-5)

[![Latest Version on Packagist](https://camo.githubusercontent.com/bc4f3919ff3b69a87992b6681a9e5eb1e660ad233569acc6f7416cbf939637ad/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d696775656c5f636f7374612f6f66666963653336356170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/miguel_costa/office365api)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/db5def16840026bc2ee0db17b72259dd31fdc9ee4e6b56aaae072d48242635b6/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6d696775656c5f636f7374612f6f66666963653336356170692f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/miguel_costa/office365api)[![Coverage Status](https://camo.githubusercontent.com/d5e204b2e0d0ab7aa3776809b30070ca5ac0f22a60e758d1dd4ee7d6413c3a32/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f6d696775656c5f636f7374612f6f66666963653336356170692e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/miguel_costa/office365api/code-structure)[![Quality Score](https://camo.githubusercontent.com/d27b14be7ec90b16b07f3337c059a28a88962bb5e3a28db10d61350772d88820/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6d696775656c5f636f7374612f6f66666963653336356170692e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/miguel_costa/office365api)[![Total Downloads](https://camo.githubusercontent.com/1104e5a96b0be74371eb2231a87504946699541b2d0ee2223f91d39aea9e5209/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d696775656c5f636f7374612f6f66666963653336356170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/miguel_costa/office365api)

This is the first test of a package to Laravel 5 , actually is already working, is getting the connection to the Microsoft Graph api correctly, as soon as i can i will document this file better, The purpose of the project is getting bigger and extends the classes with all the options of their API (send emails, read emails, control the calendar, create events, create users, etc).

Install
-------

[](#install)

Via Composer

```
$ composer require miguel_costa/office365api
```

Add the provider in the file *app.php* at folder config

```
Miguel_Costa\Office365API\Office365APIServiceProvider::class,
```

Publish the config file in your folder *config/Office365API.php*

```
$ php artisan vendor:publish
```

Finally, configure the file *Office365API.php* at config folder with your credentials of your API at Microsoft Dev Portal
[App Registration Portal](https://apps.dev.microsoft.com/)

```
    'CLIENT_ID' => 'your id string goes here...',
    'CLIENT_SECRET' => 'your secret key goes here...',
    'REDIRECT_URI' => 'your redirect url, Should be the route of laravel where will redirect once the connection is finished',
```

Usage
-----

[](#usage)

```
//use the namespace corretly on your controller
use Miguel_Costa\Office365API\ConnectAPI;

//example of function to make the connection
public function redirect_connect() {
ConnectAPI::connect_officeAPI();
}

//get the connection and redirect the user to the intended page
public function get_connection() {
ConnectAPI::get_connection();
return view('home');
}
```

Get the connection at the blade view: The connection saves an Session variable of the username and email, so after making the connection you can access the variables like that:

```
@if(Session::has('office365_name'))
Welcome, {{Session::get('office365_name')}}
You are logged in with the Office365 Account:{{Session::get('office365_email')}}
@endif
```

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email "[tga\_miguel\_tga@hotmail.com](mailto:tga_miguel_tga@hotmail.com)" instead of using the issue tracker.

Credits
-------

[](#credits)

- \[Miguel Costa\]\[\]
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3533d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ba33beb898ddbda3f74be8a9db2dcb9629dfab34f5e94c710385ad0dfd9bd982?d=identicon)[mgcostaParedes](/maintainers/mgcostaParedes)

---

Tags

Miguel\_CostaOffice365API

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/miguel-costa-office365api/health.svg)

```
[![Health](https://phpackages.com/badges/miguel-costa-office365api/health.svg)](https://phpackages.com/packages/miguel-costa-office365api)
```

###  Alternatives

[dcblogdev/laravel-microsoft-graph

A Laravel Microsoft Graph API (Office365) package

168285.5k1](/packages/dcblogdev-laravel-microsoft-graph)[fumeapp/modeltyper

Generate TypeScript interfaces from Laravel Models

196277.9k](/packages/fumeapp-modeltyper)[dcblogdev/laravel-xero

A Laravel Xero package

53129.1k1](/packages/dcblogdev-laravel-xero)

PHPackages © 2026

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