Download the PHP package joeystowe/ms-graph-api without Composer

On this page you can find all versions of the php package joeystowe/ms-graph-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package ms-graph-api

MS GRAPH API PLUGIN

This adds helper methods to call the MS Graph API and installs a middleware/routes to implement MS Authentication

Installation

You can install the package via composer:

Usage

SSO Authentication


The plugin installs a middleware ('ms-auth') and 2 routes (/auth/callback and /logout). To protect a route with authentication you must apply the middleware to the desired routes and set your env variables

Apply middleware example

Or use middleware groups

[!CAUTION] You can not add the middleware globally or in the web group because the auth callback method needs to be publicy accessible

Set you .env variables

Accessing the user

The ms-auth middleware sets the following scoped session values

You can reference these directly or you can use the LoggedInUser helper class:

Logging Out

Simply hit the '/logout' route to log the user out. After logging out from MS the user will be redirected to a '/postLogout' page. Be sure to set your APP_URL correctly so the "log back in" url will work correctly.

You will also need to publish the assets for the postLogout page to be fully functional:

Calling Graph API


The plugin also gives you helper methods to call the MS graph API

Logged In User Methods

Groups

Changelog

Please see CHANGELOG for more information what has changed recently.

Credits

License

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


All versions of ms-graph-api with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
laravel/socialite Version ^5.11
socialiteproviders/microsoft-azure Version ^5.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package joeystowe/ms-graph-api contains the following files

Loading the files please wait ....