

You’ll need to install microsoft/microsoft-graph via composer into your PHP project. You can do this by:
composer require microsoft/microsoft-graph
or via your composer file composer.json
{“require”:{“microsoft/microsoft-graph”: “^1.5”}}
If you don’t know how to install composer you can read about it here: How to install composer to your php project
The GIT repository of msgraph-sdk-php can be found here: https://github.com/microsoftgraph/msgraph-sdk-php
The overview of GRAPH can be found here: https://docs.microsoft.com/en-us/graph/overview
ONEDRIVE GRAPH: https://docs.microsoft.com/en-us/onedrive/developer/rest-api/index?view=odsp-graph-online
The complete reference of possible usages with explanation for API v.1.0: https://docs.microsoft.com/en-us/graph/api/overview?view=graph-rest-1.0
cacert.pem can be downloaded directly from our site: cacert.pem
if you don’t set the certificate you will encounter errors like:
RequestException in CurlFactory.php line 187: cURL error 60: SSL certificate problem: unable to get local issuer certificate (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)
GRAPH has no authentication method included, so you will need to install one with oauth2.
You can do that via composer require league/oauth2-client
You see that we point each route to a specific function inside of our AuthController.
To have a very rudimentary Login and Logout possibility for connection with GRAPH you can use the following HTML: