Category : sharepoint

I’m working with phpSPO library to upload genereted files in a laravel PHP App. I’m using user credential auth (the user is admin and owner of the SP site) and i follow this guide to granting access at the app https://docs.microsoft.com/en-us/sharepoint/dev/solution-guidance/security-apponly-azureacs. I always get this error {"error":{"code":"-2147024891, System.UnauthorizedAccessException","message":{"lang":"en-US","value":"Access denied. You do not have permission to ..

Read more

I’m working with phpSPO library for work with sharePooint in a PHP app. https://github.com/vgrem/phpSPO I am using the following code to copy one directory to another in Sharepoint <?php spl_autoload_register(function ($classname) { $classname = ltrim($classname, ""); preg_match(‘/^(.+)?([^\]+)$/U’, $classname, $match); $classname = ‘./’.str_replace("", "/", $match[1]) .str_replace(array("", "_"), "/", $match[2]) .".php"; include_once $classname; }); use Office365RuntimeAuthClientCredential; use ..

Read more

I’m working with phpSPO library for work with sharePooint in a PHP app. https://github.com/vgrem/phpSPO I am using the following code to successfully create a folder in the Shared Documents folder on Sharepoint: <?php spl_autoload_register(function ($classname) { $classname = ltrim($classname, ""); preg_match(‘/^(.+)?([^\]+)$/U’, $classname, $match); $classname = ‘./’.str_replace("", "/", $match[1]) .str_replace(array("", "_"), "/", $match[2]) .".php"; include_once $classname; ..

Read more

I am tasked with accessing sharepoint from a legacy PHP web site. I have a good basic understanding of scripting PHP on small web projects. I need to add perform basic tasks such as adding and removing sharepoint folders to a parent and uploading and maintaining files. What is the best (standard) way of achieving ..

Read more

I have on my ftp space(folder test1) the following directory/file: /Thybag test.php I am using the API for SP: THYBAG This is my code php: require_once __DIR__ . ‘/Thybag/SharePointAPI.php’; require_once __DIR__ . ‘/Thybag/Auth/SharePointOnlineAuth.php’; require_once __DIR__ . ‘/Thybag/Auth/SoapClientAuth.php’; require_once __DIR__ . ‘/Thybag/Auth/StreamWrapperHttpAuth.php’; require_once __DIR__ . ‘/Thybag/Service/ListService.php’; require_once __DIR__ . ‘/Thybag/Service/QueryObjectService.php’; include "/Thybag/SharePointAPI.php"; $sp = new SharePointAPI(‘[email protected]’, ..

Read more

I am trying to retrieve the contents of shared Onedrive folders on Sharepoint sites for clients. In php with Guzzle I call the OneDrive api and the user token: https://api.onedrive.com/v1.0/shares/{TOKEN}/root?expand=children then I retrieve the content like this: $token = "****"; $url = preg_replace("/{TOKEN}/", $token, "https://api.onedrive.com/v1.0/shares/{TOKEN}/root?expand=children"); try { $res = $client->request("GET", $url, ["headers" => ["Content-Type" => ..

Read more

I’m trying to fetch the attached files from ListItem’s using the php-spo lib (v2.4.3) but I keep getting this error: Fatal error: Uncaught Office365RuntimeHttpRequestException: {"error":{"code":"-2147024809, System.ArgumentException","message":{"lang":"en-US","value":"Column ‘Attachments’ does not exist. It may have been deleted by another user."}}} in /home/pr/projects/php-spo/vendor/vgrem/php-spo/src/Runtime/ClientRequest.php on line 213 This is my test code: <?php use Office365RuntimeAuthUserCredentials; use Office365SharePointClientContext; require_once(__DIR__ . ..

Read more

i have been tasked to create a Sharepoint add-in, hosted in a Php project of the company to get advantage of some already implemented functionalities. The documentation is just focused on developing using Visual Studio but i followed this guide https://github.com/OfficeDev/PHP-App-for-SharePoint and got the first step of creating the app. But the guide doesn’t provide ..

Read more