Download the PHP package adnanhussainturki/microsoft-api-php without Composer

On this page you can find all versions of the php package adnanhussainturki/microsoft-api-php. 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 microsoft-api-php

Artboard 1

Microsoft API PHP Wrapper

Microsoft provides its application registration via its server side of giant service service called Azure. In order to use its API and this wrapper you must need to register your own Microsoft App in Azure Portal.

Installation

You can install this library to your project via composer using the following command:

composer require adnanhussainturki/microsoft-api-php

Authentication

Microsoft uses OAuth 2.0 meaning Access Token is the key to pull data from the Microsoft servers on behalf of the user for which access token is generated. Access token is generated only for the nodes for which the authenticated user allowed your app to.

These nodes are called as scopes which dictates what types of data and functions can the app perform on the behalf of the authenticated user (against her access token). You can get the applicable scopes, in this document.

This wrapper also supports tenants. If you want users of only your organization (Azure) to use this app, you can use respective tenant otherwise common will work fine for general microsoft user authentication.

Fetching & Setting Access Token (Shorter life)

Fetching user data

Once the access token is set to the wrapper, you can just initialize the User model and the related data will get pulled out for you.

Fetching Refresh Token (Longer Life)

For fetching refresh token along with the access token, you need to provide offline_access as an scope and then fetch access token. On the callback, you will recieve refresh token along with access token.

Using Refresh Token

If you have active refresh token for an user, you do need ask for the user permission to get accesss token against that user. You can set the refresh token to the wrapper and the wrapper will fetch access token for you against it.

Buy me a coffee

How to contribute

License

Licensed under Apache 2.0. You can check its details here.


All versions of microsoft-api-php with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6
microsoft/microsoft-graph Version ^1.0
league/flysystem Version ^1.0
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 adnanhussainturki/microsoft-api-php contains the following files

Loading the files please wait ....