2017 © Pedro Peláez
 

library office365api

First test of connection to Microsoft Graph API 1.0

image

miguel_costa/office365api

First test of connection to Microsoft Graph API 1.0

  • Tuesday, September 6, 2016
  • by mgcostaParedes
  • Repository
  • 2 Watchers
  • 5 Stars
  • 129 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 7 % Grown

The README.md

Office 365 Graph API Connection Oauth2 Laravel 5

Latest Version on Packagist ![Software License][ico-license] Build Status ![Coverage Status][ico-scrutinizer] Quality Score ![Total Downloads][ico-downloads], (*1)

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)., (*2)

Install

Via Composer, (*3)

``` bash $ composer require miguel_costa/office365api, (*4)



Add the provider in the file <i>app.php</i> at folder config ``` php Miguel_Costa\Office365API\Office365APIServiceProvider::class,

Publish the config file in your folder config/Office365API.php, (*5)

``` bash $ php artisan vendor:publish, (*6)


Finally, configure the file <i>Office365API.php</i> at config folder with your credentials of your API at Microsoft Dev Portal </br> <a href="https://apps.dev.microsoft.com/">App Registration Portal</a> ``` php '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

``` php //use the namespace corretly on your controller use Miguel_Costa\Office365API\ConnectAPI;, (*7)

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

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

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:
``` php
@if(Session::has('office365_name'))


Welcome, {{Session::get('office365_name')}}, (*10)

You are logged in with the Office365 Account:{{Session::get('office365_email')}}, (*11)

@endif

Change log

Please see CHANGELOG for more information what has changed recently., (*12)

Contributing

Please see CONTRIBUTING and CONDUCT for details., (*13)

Security

If you discover any security related issues, please email "tga_miguel_tga@hotmail.com" instead of using the issue tracker., (*14)

Credits

License

The MIT License (MIT). Please see License File for more information., (*15)

The Versions

06/09 2016

dev-master

9999999-dev https://github.com/mgcostaParedes/Office365-API-Oauth2-Laravel

First test of connection to Microsoft Graph API 1.0

  Sources   Download

MIT

The Requires

 

The Development Requires

miguel_costa office365api

05/09 2016

1.0

1.0.0.0 https://github.com/Miguel_Costa/Office365API

First test of connection to Microsoft Graph API 1.0

  Sources   Download

MIT

The Requires

 

The Development Requires

miguel_costa office365api