{"repo":"microsoftgraph/msgraph-sdk-php","free":true,"listed":false,"github":"https://github.com/microsoftgraph/msgraph-sdk-php","clone":"git clone https://github.com/microsoftgraph/msgraph-sdk-php.git","description":"Microsoft Graph Library for PHP.","language":"PHP","stars":668,"topics":["microsoftgraph","sdk","devxeng"],"license":null,"category":"api-integrations-sdks","readme_excerpt":"Get started with the Microsoft Graph SDK for PHP Install the SDK Prerequisites - PHP 8.2 or later (see PHP supported versions) You can install the PHP SDK with Composer by editing your composer.json file: Get started with Microsoft Graph Register your application Register your application to use the Microsoft Graph API using Microsoft Azure Active Directory in your tenant's Active Directory to support work or school users for your tenant, or multiple tenants. Create a Token Request Context A Token Request Context contains the credentials used to authenticate requests. The SDK supports various contexts that align with OAuth 2.0 flows: client credentials , authorization code and on behalf of with support for secret-based and certificate-based client authentication. Under the hood, the Token Request Context is passed to an authentication provider which fetches, caches and refreshes access tokens ensuring all requests are authenticated against the Microsoft Identity platform. The following sample creates a TokenRequestContext that gets access without a user: To gets access on behalf of a user: Note that your application will need to handle redirecting the user to the Microsoft Identity login page to get the authorization code that's passed into the AuthorizationCodeContext . See for more on the authorization code grant flow. To keep your user signed in across multiple requests within a session, see section on access token management Initialize a GraphServiceClient Using the Token","default_branch":null,"files":null,"tree":[],"storefront":"/r/microsoftgraph","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/microsoftgraph/msgraph-sdk-php/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}