onedrive-php-sdk icon indicating copy to clipboard operation
onedrive-php-sdk copied to clipboard

guzzle error while creating a file in a shared onedrive directory under another user

Open thc2018 opened this issue 3 years ago • 0 comments

There is an administrator account, a@corp.*. ru. Under it in OneDrive created folders with shared access - !CMIT/!CALCULATIONS and a folder !CMIT/!ORDERS. Php script, using the onedrive-php-sdk library, via API successfully under the username a@corp..ru creates folders and files there (in these directories)

There is a user, n.sh@cor.. ru. This user has rights to create folders and files in folders !CMIT/!CALCULATIONS and !CMIT/!ORDERS created by user a@corp.**. ru. Under user n.sh@cor.. ru I can manually create files there.

But when a php script does this, the script crashes with an error:

Fatal error: Uncaught GuzzleHttp\Exception\ServerException: Server error: PUT https://graph.microsoft.com/v1.0/drives/b!QWgEs7zIXk6G4pFtORRumMe72iv1lmBCt0zrqAYIayqW2y49fjAeS4AbgYL555Zm/items/015SXV7MF6Y2GOVW7725BZ5555PWSELRRZ:/%2F%21%D0%A6%D0%9C%D0%98%D0%A2%2F%21%D0%97%D0%90%D0%9A%D0%90%D0%97%D0%AB%2FCMITORDER_656_%D0%A8%20%D0%B7%D0%B0%D0%BA%D0%B0%D0%B7%2Fid.txt:/content resulted in a 500 Internal Server Error response: {"error":{"code":"generalException","message":"General exception while processing","innerError":{"date":"2021-06-10T10:30:38","request-id":"1ec3f83d-ce2f-4ca5-845a-972eb6f77xf5","client-request-id":"1ec3f83d-ce2f-4ca5-845a-972eb6f77xf5"}}} in /home//web/cmit..ru/public_html/667VQLfzCAlk7o5avr/onedrive-php-sdk/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113 Stack trace: #0 /home//web/cmit..ru/public_html/667VQLfzCAlk7o5avr/onedrive-php-sdk/vendor/guzzlehttp/guzzle/src/Middleware.php(69): GuzzleHttp\Exception\RequestException::create() #1 /home//web/cmit..ru/pub in /home//web/cmit..ru/public_html/667VQLfzCAlk7o5avr/onedrive-php-sdk/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php on line 113

How can I solve this?

thc2018 avatar Jun 21 '21 11:06 thc2018