Documentation

Graph

Class Graph

Tags
category

Library

license

https://opensource.org/licenses/MIT MIT License

link
https://graph.microsoft.io/

Table of Contents

$_accessToken  : string
The access_token provided after authenticating with Microsoft Graph (required)
$_apiVersion  : string
The api version to use ("v1.0", "beta") Default is "v1.0"
$_baseUrl  : string
The base url to call Default is "https://graph.microsoft.com"
$_proxyPort  : string
The port to use for proxy requests Null disables port forwarding
$_proxyVerifySSL  : bool
Whether SSL verification should be used for proxy requests
__construct()  : mixed
Creates a new Graph object, which is used to call the Graph API
createCollectionRequest()  : GraphCollectionRequest
Creates a new collection request object with the given Graph information
createRequest()  : GraphRequest
Creates a new request object with the given Graph information
setAccessToken()  : Graph
Sets the access token. A valid access token is required to run queries against Graph
setApiVersion()  : Graph
Sets the API version to use, e.g. "beta" (defaults to v1.0)
setBaseUrl()  : Graph
Sets the Base URL to call (defaults to https://graph.microsoft.com)
setProxyPort()  : Graph
Sets the proxy port. This allows you to use tools such as Fiddler to view requests and responses made with Guzzle

Properties

$_accessToken

The access_token provided after authenticating with Microsoft Graph (required)

private string $_accessToken

$_apiVersion

The api version to use ("v1.0", "beta") Default is "v1.0"

private string $_apiVersion

$_baseUrl

The base url to call Default is "https://graph.microsoft.com"

private string $_baseUrl

$_proxyPort

The port to use for proxy requests Null disables port forwarding

private string $_proxyPort

$_proxyVerifySSL

Whether SSL verification should be used for proxy requests

private bool $_proxyVerifySSL

Methods

__construct()

Creates a new Graph object, which is used to call the Graph API

public __construct() : mixed
Return values
mixed

createCollectionRequest()

Creates a new collection request object with the given Graph information

public createCollectionRequest(string $requestType, string $endpoint) : GraphCollectionRequest
Parameters
$requestType : string

The HTTP method to use, e.g. "GET" or "POST"

$endpoint : string

The Graph endpoint to call

Tags
throws
GraphException
Return values
GraphCollectionRequest

The request object, which can be used to make queries against Graph

createRequest()

Creates a new request object with the given Graph information

public createRequest(string $requestType, string $endpoint) : GraphRequest
Parameters
$requestType : string

The HTTP method to use, e.g. "GET" or "POST"

$endpoint : string

The Graph endpoint to call

Tags
throws
GraphException
Return values
GraphRequest

The request object, which can be used to make queries against Graph

setAccessToken()

Sets the access token. A valid access token is required to run queries against Graph

public setAccessToken(string $accessToken) : Graph
Parameters
$accessToken : string

The user's access token, retrieved from MS auth

Return values
Graph

object

setApiVersion()

Sets the API version to use, e.g. "beta" (defaults to v1.0)

public setApiVersion(string $apiVersion) : Graph
Parameters
$apiVersion : string

The API version to use

Return values
Graph

object

setBaseUrl()

Sets the Base URL to call (defaults to https://graph.microsoft.com)

public setBaseUrl(string $baseUrl) : Graph
Parameters
$baseUrl : string

The URL to call

Return values
Graph

object

setProxyPort()

Sets the proxy port. This allows you to use tools such as Fiddler to view requests and responses made with Guzzle

public setProxyPort(mixed $port[, bool $verifySSL = false ]) : Graph
Parameters
$port : mixed
$verifySSL : bool = false

Whether SSL verification should be enabled

Return values
Graph

object

Search results