vgrem/php-spo
PHP Office 365 library. It allows to performs CRUD operations against Office 365 resources via an REST/OData based API
v3.2.0
1.6M downloads/mo
#3706 most downloaded on Packagist
vgrem/phpSPO
What this package is like to depend on
Last release 1 years ago
17 Aug 2025
Release timing varies
gaps range from 6 weeks to 1.3 years
Some releases are documented
notes for 10 of 29 stable releases
Nothing withdrawn
no release was ever pulled
9 years old
29 releases · first in 2017
0 releases in the last 12 months
see the full history below
Release timeline
29 releases · Apr 2017 to Aug 2025Releases
latest 29-
v3.2.017 Aug 2025Release notes
Open source →Changelog
New Features
- Planner API: Enhanced support for Microsoft Graph Planner API
Fixes & Improvements
- PR #352: Fix OneDrive file upload session retry logic (by @it-can)
- PR #350: Improve error handling for SharePoint API requests (by @VincentFoulon80)
- PR #348: Fix metadata handling in file uploads (by @JensDeMuynck)
- PR #129: Fix OneDrive large file upload session
Release notes
Open source →Added
- Planner API: Enhanced support for Microsoft Graph Planner API
Fixed
- #352: Fix OneDrive file upload session retry logic (by @it-can)
- #350: Improve error handling for SharePoint API requests (by @VincentFoulon80)
- PR #348: Fix metadata handling in file uploads (by @JensDeMuynck)
- PR #129: Fix OneDrive large file upload session
-
v3.1.221 Apr 2024Release notes
Open source →Added
GraphServiceClient::withUserCredentialsandGraphServiceClient::withClientSecretmethods introduced
Fixed
- #337: Don't try to retrieve next set of items when using an iterator, if no next items are expected to exist
Release notes
Open source →Added
GraphServiceClient::withUserCredentialsandGraphServiceClient::withClientSecretmethods introduced
Fixed
- #337: Don't try to retrieve next set of items when using an iterator, if no next items are expected to exist
-
v3.1.130 Sep 2023Release notes
Open source →Changelog
- SharePoint model updated to
16.0.24106.12014version - import fixes (patches for 3.1.0 version)
- SharePoint model updated to
-
v3.1.029 Sep 2023Release notes
Open source →Changelog
- support for authenticate SharePoint API via client certificate flow
- validate access token response in
GraphServiceClient
Example: how to authenticate SharePoint API via client certificate flow
$siteUrl = "https://contoso.sharepoint.com"; //site or web absolute url $tenant = "contoso.onmicrosoft.com"; //tenant id or name $thumbprint = "--thumbprint goes here--"; $clientId = "--client app id goes here--"; $privateKetPath = "-- path to private.key file--" $privateKey = file_get_contents($privateKetPath); $ctx = (new ClientContext($siteUrl))->withClientCertificate( $tenant, $clientId, $privateKey, $thumbprint); $whoami = $ctx->getWeb()->getCurrentUser()->get()->executeQuery(); print $whoami->getLoginName();
-
v3.0.315 Jul 2023Release notes
Open source →Changelog
- support for document sets in SharePoint API
- fix addering issue with web resource
Example: create a Document Set
$credentials = new ClientCredential($clientId, $clientSecret); $client = (new ClientContext($siteUrl))->withCredentials($credentials); $docSetName = "Orders"; $lib = $client->getWeb()->defaultDocumentLibrary(); $docSet = DocumentSet::create($client, $lib->getRootFolder(), $docSetName)->executeQuery(); print($docSet->getProperty("ServerRelativeUrl"));
Release notes
Open source →Added
- SharePoint document set support
Fixed
- Fix SharePoint upload with small files (#328)
- SharePoint web resource URL computation
-
v3.0.203 Mar 2023Release notes
Open source →Fixed
- Autoloading for SharePoint/Publishing/ classes
- Fix OneDrive createFolder()
-
v3.0.121 Jan 2023Release notes
Open source →Changelog
- #300: add
CcRecipientsproperty toMessageclass by @DavidBrogli - #304: Http Response improvements by @lbuchs
- #307 add example to obtain available fields of a list by @cweiske
- #318 Support for custom curl options by @drml
ClientObjectCollectionclass enhancements, introducedgetAllmethod by @vgrem
Example: read list items in a large list via
getAllmethod:$ctx = (new ClientContext($siteUrl))->withCredentials($credentials); $list = $ctx->getWeb()->getLists()->getByTitle("--large list title--"); $allItems = $list->getItems()->getAll(5000, function ($returnType){ print("{$returnType->getPageInfo()} items loaded...\n"); })->executeQuery();
Release notes
Open source →Breaking
- ClientObjectCollection::get() only returns a limited set of data. Use getAll() now instead.
Added
- Update SharePoint models to version 16.0.22921.12007
- Update SharePoint models to version 16.0.23207.12005
- Add CC recipients in outlook messages (#300)
- New functions in Http\Response (#304)
- SharePoint/Field::enableIndex() method
- SharePoint/ClientContext::getGroupSiteManager(), ::getPeopleManager(), ::getSiteManager(), ::getSearch() and getTaxonomy()
- SharePoint/Search/SearchService::export()
- Example for obtaining fields of a list (#307)
- Example to list all lists (#316)
- Examples to read large lists, update list items and create indexes
Fixed
- Sending mails with attachments (#301)
- Option merging in Http\Requests::setDefaultOptions (#319)
Removed
- Http\Requests::execute() $headers parameter (#304)
- state from ClientRequest
- #300: add
-
v3.0.007 Oct 2022Release notes
Open source →Changelog
- #283: exception handling enhancements for authentication requests by @SuperDJ
- #286: introduced client secret support for
acquireTokenForPasswordmethod inAADTokenProviderclass by @R-TECH - #287 and #288: captures and validates if response failed by @fr3nch13
- #297: remove minimum-stability from
composer.jsonby @cweiske - #298 and #299: deprecation fixes for
PHP 8and dropPHP 5.5requirement by @cweiske
Release notes
Open source →Breaking
- Support for PHP version < 7.1.0
Added
- Support for confidential clients (#286)
- Throw exception on outdated client credentials (#283)
Fixed
- Fix deprecations on PHP 8 (#298)
- Validate each individual server response (#287)
- Do not throw exception on all 4xx responses (#288)
-
v2.5.407 Jul 2022Release notes
Open source →Changelog
- SharePoint API File and Folder addressing enhancements, namely supporting % and # in files and folders with the ResourcePath API
- #284: example bug fixed for addressing a file by @la-costa
- #282: improved authorization error handling by @SuperDJ
-
v2.5.305 Feb 2022Release notes
Open source →Changelog
- SharePoint API: improved support for composite field values namely
FieldLookupValue/FieldMultiLookupValue,FieldMultiChoiceValue, referexample 1below ( related issues: #261) - OData request/response serialization optimizations (namely excluding metadata annotations from response by default)
Example : create list item and specify multi lookup & choice fields values:
$list = $ctx->getWeb()->getLists()->getByTitle("Tasks"); $taskProps = array( 'Title' => "New task", 'ParentTask' => new FieldLookupValue($taskLookupId), 'PrimaryManager' => new FieldUserValue($userId), 'Managers' => new FieldMultiLookupValue([$userId]), 'TaskCategories' => new FieldMultiChoiceValue(["Event", "Reminder"]) ); $item = $list->addItem($taskProps)->executeQuery();
- SharePoint API: improved support for composite field values namely
-
2.5.209 Oct 2021Nothing published for this version
-
2.5.122 Aug 2021Nothing published for this version
-
v2.5.015 May 2021Nothing published for this version
-
v2.4.506 May 2021Nothing published for this version
-
v2.4.412 Mar 2021Nothing published for this version
-
v2.4.314 Nov 2020Nothing published for this version
-
v2.4.219 Aug 2020Nothing published for this version
-
v2.4.121 May 2020Nothing published for this version
-
v2.4.024 Apr 2020Nothing published for this version
-
v2.3.116 Nov 2019Nothing published for this version
-
v2.3.020 Oct 2019Nothing published for this version
-
v2.2.519 Sep 2019Nothing published for this version
-
v2.2.403 Jul 2019Nothing published for this version
-
v2.2.312 Mar 2019Nothing published for this version
-
v2.2.227 Oct 2018Nothing published for this version
-
v2.2.104 Aug 2018Nothing published for this version
-
v2.2.017 Jul 2018Nothing published for this version
-
v2.1.929 Jun 2018Nothing published for this version
-
v2.1.820 Apr 2017Nothing published for this version