\Microsoft\GraphGraph

Class Graph

Summary

Methods
Properties
Constants
__construct()
setBaseUrl()
setApiVersion()
setAccessToken()
createRequest()
createCollectionRequest()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$_accessToken
$_apiVersion
$_baseUrl
N/A

Properties

$_accessToken

$_accessToken : string

The access_token provided after authenticating with Microsoft Graph (required)

Type

string

$_apiVersion

$_apiVersion : string

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

Type

string

$_baseUrl

$_baseUrl : string

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

Type

string

Methods

__construct()

__construct() 

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

setBaseUrl()

setBaseUrl(string  $baseUrl) : \Microsoft\Graph\the

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

Parameters

string $baseUrl

The URL to call

Returns

\Microsoft\Graph\the —

Graph object

setApiVersion()

setApiVersion(string  $apiVersion) : \Microsoft\Graph\the

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

Parameters

string $apiVersion

The API version to use

Returns

\Microsoft\Graph\the —

Graph object

setAccessToken()

setAccessToken(string  $accessToken) : \Microsoft\Graph\the

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

Parameters

string $accessToken

The user's access token, retrieved from MS auth

Returns

\Microsoft\Graph\the —

Graph object

createRequest()

createRequest(string  $requestType, string  $endpoint) : \Microsoft\Graph\Http\GraphRequest

Creates a new request object with the given Graph information

Parameters

string $requestType

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

string $endpoint

The Graph endpoint to call

Returns

\Microsoft\Graph\Http\GraphRequest

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

createCollectionRequest()

createCollectionRequest(string  $requestType, string  $endpoint) : \Microsoft\Graph\Http\GraphCollectionRequest

Creates a new collection request object with the given Graph information

Parameters

string $requestType

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

string $endpoint

The Graph endpoint to call

Returns

\Microsoft\Graph\Http\GraphCollectionRequest

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