OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
[#66698] Sharepoint Copy Template Folder Command
Pavel Balashoucf8ea457fec2
diff --git a/modules/storages/app/common/storages/adapters/providers/sharepoint/commands/copy_template_folder_command.rb b/modules/storages/app/common/storages/adapters/providers/sharepoint/commands/copy_template_folder_command.rbnew file mode 100644index 00000000000..e9c2ee7e190--- /dev/null+++ b/modules/storages/app/common/storages/adapters/providers/sharepoint/commands/copy_template_folder_command.rb@@ -0,0 +1,91 @@+# frozen_string_literal: true++#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See COPYRIGHT and LICENSE files for more details.+#++++module Storages+ module Adapters+ module Providers+ module Sharepoint+ module Commands+ class CopyTemplateFolderCommand < Base+ def initialize(storage)+ super+ @data = Results::CopyTemplateFolder.new(id: nil, polling_url: nil, requires_polling: true)+ end++ def call(auth_strategy:, input_data:)+ with_tagged_logger do+ info "Requesting Copy of folder #{input_data.source} to #{input_data.destination}"+ Authentication[auth_strategy].call(storage: @storage) do |httpx|+ split_identifier(input_data.source) => { drive_id: source_drive_id, location: source_item_id }+ handle_response(+ httpx.post(+ UrlBuilder.url(base_uri,+ "/v1.0/drives",+ source_drive_id,+ "/items",+ source_item_id,+ "/copy") + query,+ json: {+ name: input_data.destination+ }+ )+ )+ end+ end+ end++ private++ def handle_response(response)+ error = Results::Error.new(source: self.class, payload: response)++ case response+ in { status: 202 }+ Success(@data.with(polling_url: response.headers[:location]))+ in { status: 401 }+ Failure(error.with(code: :unauthorized))+ in { status: 403 }+ Failure(error.with(code: :forbidden))+ in { status: 404 }+ Failure(error.with(code: :not_found))+ in { status: 409 }+ Failure(error.with(code: :conflict))+ else+ Failure(error.with(code: :error))+ end+ end++ def query = "[email protected]=fail"+ end+ end+ end+ end+ end+enddiff --git a/modules/storages/app/common/storages/adapters/providers/sharepoint/sharepoint_registry.rb b/modules/storages/app/common/storages/adapters/providers/sharepoint/sharepoint_registry.rbindex c20f6791e44..646bf64152e 100644--- a/modules/storages/app/common/storages/adapters/providers/sharepoint/sharepoint_registry.rb+++ b/modules/storages/app/common/storages/adapters/providers/sharepoint/sharepoint_registry.rb@@ -44,6 +44,7 @@ module Storagesregister(:rename_file, Commands::RenameFileCommand)register(:create_list, Commands::CreateListCommand)register(:set_permissions, Commands::SetPermissionsCommand)+ register(:copy_template_folder, Commands::CopyTemplateFolderCommand)endnamespace("components") dodiff --git a/modules/storages/spec/common/storages/adapters/providers/sharepoint/commands/copy_template_folder_command_spec.rb b/modules/storages/spec/common/storages/adapters/providers/sharepoint/commands/copy_template_folder_command_spec.rbnew file mode 100644index 00000000000..5bfcf3f0be7--- /dev/null+++ b/modules/storages/spec/common/storages/adapters/providers/sharepoint/commands/copy_template_folder_command_spec.rb@@ -0,0 +1,99 @@+# frozen_string_literal: true++#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See COPYRIGHT and LICENSE files for more details.+#++++require "spec_helper"+require_module_spec_helper++module Storages+ module Adapters+ module Providers+ module Sharepoint+ module Commands+ RSpec.describe CopyTemplateFolderCommand, :webmock do+ shared_let(:storage) { create(:sharepoint_storage, :sandbox) }+ shared_let(:base_drive) { "b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY9jo6leJDqrT7muzvmiWjFW" }++ let(:input_data) { Input::CopyTemplateFolder.build(source:, destination:).value! }+ let(:auth_strategy) { Registry["sharepoint.authentication.userless"].call }++ it "is registered under commands.sharepoint.copy_template_folder" do+ expect(Registry.resolve("sharepoint.commands.copy_template_folder")).to eq(described_class)+ end++ it "responds to .call" do+ expect(described_class).to respond_to(:call)+ end++ describe "#call" do+ let(:source) { "#{base_drive}:01ANJ53W2LHDLFFGQN4RHJRV6HAK2CFDCT" }+ let(:destination) { "My New Folder" }++ it "copies origin folder and all underlying files and folders to the destination_path",+ vcr: "sharepoint/copy_template_folder_copy_successful" do+ command_result = described_class.call(auth_strategy:, storage:, input_data:)++ expect(command_result).to be_success+ data = command_result.value!++ expect(data).to be_requires_polling+ expect(data.polling_url).to match %r</drives/#{base_drive}/items/.+\?.+$>+ end++ describe "error handling" do+ context "when the source_path does not exist" do+ let(:source) { "#{base_drive}:TheCakeIsALie" }+ let(:destination) { "Not Happening" }++ it "fails", vcr: "sharepoint/copy_template_source_not_found" do+ result = described_class.call(auth_strategy:, storage:, input_data:)++ expect(result).to be_failure+ expect(result.failure.code).to eq(:not_found)+ end+ end++ context "when it would overwrite an already existing folder" do+ let(:destination) { "My New Folder" }++ it "fails", vcr: "sharepoint/copy_template_folder_no_overwrite" do+ result = described_class.call(auth_strategy:, storage:, input_data:)++ expect(result).to be_failure+ expect(result.failure.code).to eq(:error)+ end+ end+ end+ end+ end+ end+ end+ end+ end+enddiff --git a/modules/storages/spec/support/fixtures/vcr_cassettes/sharepoint/copy_template_folder_copy_successful.yml b/modules/storages/spec/support/fixtures/vcr_cassettes/sharepoint/copy_template_folder_copy_successful.ymlnew file mode 100644index 00000000000..008513268f9--- /dev/null+++ b/modules/storages/spec/support/fixtures/vcr_cassettes/sharepoint/copy_template_folder_copy_successful.yml@@ -0,0 +1,117 @@+---+http_interactions:+- request:+ method: post+ uri: https://login.microsoftonline.com/e36f1dbc-fdae-427e-b61b-0d96ddfb81a4/oauth2/v2.0/token+ body:+ encoding: ASCII-8BIT+ string: grant_type=client_credentials&scope=https%3A%2F%2Fgraph.microsoft.com%2F.default+offline_access&client_id=404e0567-19a1-4a64-b2d1-d3b0c99f2ed9&client_secret=QRB8Q%7Ei.1rID_.MC9FTfRGq-FTE5SgWYsoeLacWf+ headers:+ User-Agent:+ - httpx.rb/1.6.2+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ Content-Type:+ - application/x-www-form-urlencoded+ Content-Length:+ - '199'+ response:+ status:+ code: 200+ message: OK+ headers:+ Cache-Control:+ - no-store, no-cache+ Pragma:+ - no-cache+ Content-Type:+ - application/json; charset=utf-8+ Expires:+ - "-1"+ Strict-Transport-Security:+ - max-age=31536000; includeSubDomains+ X-Content-Type-Options:+ - nosniff+ P3p:+ - CP="DSP CUR OTPi IND OTRi ONL FIN"+ X-Ms-Request-Id:+ - '0805d4ee-d675-4dcd-b0d1-17153e680e00'+ X-Ms-Ests-Server:+ - 2.1.22024.3 - NEULR1 ProdSlices+ X-Ms-Srs:+ - 1.P+ Content-Security-Policy-Report-Only:+ - object-src 'none'; base-uri 'self'; script-src 'self' 'nonce-xYV5OqOk9AljTg2lgaqajw'+ 'unsafe-inline' 'unsafe-eval' https://*.msauth.net https://*.msftauth.net+ https://*.msftauthimages.net https://*.msauthimages.net https://*.msidentity.com+ https://*.microsoftonline-p.com https://*.microsoftazuread-sso.com https://*.azureedge.net+ https://*.outlook.com https://*.office.com https://*.office365.com https://*.microsoft.com+ https://*.bing.com 'report-sample'; report-uri https://csp.microsoft.com/report/ESTS-UX-All+ Cross-Origin-Opener-Policy-Report-Only:+ - same-origin; report-to="coop-endpoint"+ Reporting-Endpoints:+ - coop-endpoint="https://idux.azurewebsites.net/api/coopReport"+ X-Xss-Protection:+ - '0'+ Set-Cookie:+ - fpc=AlszKCfsAcNEmZabt1u0Fl5Z-dCOAQAAAOrPdeAOAAAA; expires=Wed, 05-Nov-2025+ 14:57:46 GMT; path=/; secure; HttpOnly; SameSite=None, x-ms-gateway-slice=estsfd;+ path=/; secure; samesite=none; httponly, stsservicecookie=estsfd; path=/;+ secure; samesite=none; httponly+ Date:+ - Mon, 06 Oct 2025 14:57:46 GMT+ Content-Length:+ - '2049'+ body:+ encoding: UTF-8+ string: '{"token_type":"Bearer","expires_in":3599,"ext_expires_in":3599,"access_token":"<ACCESS_TOKEN>"}'+ recorded_at: Mon, 06 Oct 2025 14:57:46 GMT+- request:+ method: post+ uri: https://graph.microsoft.com/v1.0/drives/b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY9jo6leJDqrT7muzvmiWjFW/items/01ANJ53W2LHDLFFGQN4RHJRV6HAK2CFDCT/[email protected]=fail+ body:+ encoding: UTF-8+ string: '{"name":"My New Folder"}'+ headers:+ User-Agent:+ - httpx.rb/1.6.2+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ Content-Type:+ - application/json; charset=utf-8+ Content-Length:+ - '24'+ Authorization:+ - Bearer <BEARER TOKEN>+ response:+ status:+ code: 202+ message: Accepted+ headers:+ Cache-Control:+ - no-store, no-cache+ Location:+ - https://ymt6d.sharepoint.com/sites/OPTest/_api/v2.0/drives/b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY9jo6leJDqrT7muzvmiWjFW/items/01ANJ53WYDT3QB6ENK2RGY73PEXH6FTBUL?force303=1&tempauth=v1.eyJzaXRlaWQiOiIxMDk5ZTMxNS1kMGM3LTQ3YzctODY0MC1hYTk1MDRiNzBmZmYiLCJhcHBfZGlzcGxheW5hbWUiOiJPUCBTZWxlY3RlZCIsIm5hbWVpZCI6IjQwNGUwNTY3LTE5YTEtNGE2NC1iMmQxLWQzYjBjOTlmMmVkOUBlMzZmMWRiYy1mZGFlLTQyN2UtYjYxYi0wZDk2ZGRmYjgxYTQiLCJhdWQiOiIwMDAwMDAwMy0wMDAwLTBmZjEtY2UwMC0wMDAwMDAwMDAwMDAveW10NmQuc2hhcmVwb2ludC5jb21AZTM2ZjFkYmMtZmRhZS00MjdlLWI2MWItMGQ5NmRkZmI4MWE0IiwiZXhwIjoiMTc1OTg0OTA2NyJ9.CkAKDGVudHJhX2NsYWltcxIwQ0w2dmo4Y0dFQUFhRmpkMFVVWkRTRmhYZWxVeWR6QlNZMVpRYldkUFFVRXFBQT09CjIKCmFjdG9yYXBwaWQSJDAwMDAwMDAzLTAwMDAtMDAwMC1jMDAwLTAwMDAwMDAwMDAwMAoKCgRzbmlkEgI2NRILCO775-zXvMI-EAUaDTIwLjE5MC4xOTAuOTYqLHhQZTBTbTlBQWt4Sk02T3RTUkxYNElicXRpUHNXeWtJTWxrcWZPMWRhc009MLEBOAFCEKHMw0LlsAAAg6Sj6tEjBXhKEGhhc2hlZHByb29mdG9rZW56ATG6AQ1zZWxlY3RlZHNpdGVzyAEB.QzaD3_ySLVu-T3lJ3n3WgYQpmH39DTZgH_XXBsbNir0+ Strict-Transport-Security:+ - max-age=31536000+ Request-Id:+ - 02afef4d-6a6c-4241-9709-9e04343bec94+ Client-Request-Id:+ - 02afef4d-6a6c-4241-9709-9e04343bec94+ X-Ms-Ags-Diagnostic:+ - '{"ServerInfo":{"DataCenter":"Germany West Central","Slice":"E","Ring":"4","ScaleUnit":"003","RoleInstance":"FR1PEPF00000D36"}}'+ Splogid:+ - 42c3cca1-b0e5-0000-83a4-a3ead1230578+ Date:+ - Mon, 06 Oct 2025 14:57:46 GMT+ Content-Length:+ - '0'+ body:+ encoding: UTF-8+ string: ''+ recorded_at: Mon, 06 Oct 2025 14:57:47 GMT+recorded_with: VCR 6.3.1diff --git a/modules/storages/spec/support/fixtures/vcr_cassettes/sharepoint/copy_template_folder_no_overwrite.yml b/modules/storages/spec/support/fixtures/vcr_cassettes/sharepoint/copy_template_folder_no_overwrite.ymlnew file mode 100644index 00000000000..970ebfde69e--- /dev/null+++ b/modules/storages/spec/support/fixtures/vcr_cassettes/sharepoint/copy_template_folder_no_overwrite.yml@@ -0,0 +1,120 @@+---+http_interactions:+- request:+ method: post+ uri: https://login.microsoftonline.com/e36f1dbc-fdae-427e-b61b-0d96ddfb81a4/oauth2/v2.0/token+ body:+ encoding: ASCII-8BIT+ string: grant_type=client_credentials&scope=https%3A%2F%2Fgraph.microsoft.com%2F.default+offline_access&client_id=404e0567-19a1-4a64-b2d1-d3b0c99f2ed9&client_secret=QRB8Q%7Ei.1rID_.MC9FTfRGq-FTE5SgWYsoeLacWf+ headers:+ User-Agent:+ - httpx.rb/1.6.2+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ Content-Type:+ - application/x-www-form-urlencoded+ Content-Length:+ - '199'+ response:+ status:+ code: 200+ message: OK+ headers:+ Cache-Control:+ - no-store, no-cache+ Pragma:+ - no-cache+ Content-Type:+ - application/json; charset=utf-8+ Expires:+ - "-1"+ Strict-Transport-Security:+ - max-age=31536000; includeSubDomains+ X-Content-Type-Options:+ - nosniff+ P3p:+ - CP="DSP CUR OTPi IND OTRi ONL FIN"+ X-Ms-Request-Id:+ - 9580d55e-5733-4291-ab15-489091750700+ X-Ms-Ests-Server:+ - 2.1.22024.3 - NEULR1 ProdSlices+ X-Ms-Srs:+ - 1.P+ Content-Security-Policy-Report-Only:+ - object-src 'none'; base-uri 'self'; script-src 'self' 'nonce-KK_kkUIBqKnHIIARA1vkOg'+ 'unsafe-inline' 'unsafe-eval' https://*.msauth.net https://*.msftauth.net+ https://*.msftauthimages.net https://*.msauthimages.net https://*.msidentity.com+ https://*.microsoftonline-p.com https://*.microsoftazuread-sso.com https://*.azureedge.net+ https://*.outlook.com https://*.office.com https://*.office365.com https://*.microsoft.com+ https://*.bing.com 'report-sample'; report-uri https://csp.microsoft.com/report/ESTS-UX-All+ Cross-Origin-Opener-Policy-Report-Only:+ - same-origin; report-to="coop-endpoint"+ Reporting-Endpoints:+ - coop-endpoint="https://idux.azurewebsites.net/api/coopReport"+ X-Xss-Protection:+ - '0'+ Set-Cookie:+ - fpc=AgZhLVe8C5tPsl1NWHuf_gFZ-dCOAQAAANXQdeAOAAAA; expires=Wed, 05-Nov-2025+ 15:01:42 GMT; path=/; secure; HttpOnly; SameSite=None, x-ms-gateway-slice=estsfd;+ path=/; secure; samesite=none; httponly, stsservicecookie=estsfd; path=/;+ secure; samesite=none; httponly+ Date:+ - Mon, 06 Oct 2025 15:01:41 GMT+ Content-Length:+ - '2043'+ body:+ encoding: UTF-8+ string: '{"token_type":"Bearer","expires_in":3599,"ext_expires_in":3599,"access_token":"<ACCESS_TOKEN>"}'+ recorded_at: Mon, 06 Oct 2025 15:01:42 GMT+- request:+ method: post+ uri: https://graph.microsoft.com/v1.0/drives/b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY9jo6leJDqrT7muzvmiWjFW/items/01ANJ53W2LHDLFFGQN4RHJRV6HAK2CFDCT/[email protected]=fail+ body:+ encoding: UTF-8+ string: '{"name":"My New Folder"}'+ headers:+ User-Agent:+ - httpx.rb/1.6.2+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ Content-Type:+ - application/json; charset=utf-8+ Content-Length:+ - '24'+ Authorization:+ - Bearer <BEARER TOKEN>+ response:+ status:+ code: 500+ message: Internal Server Error+ headers:+ Cache-Control:+ - no-store, no-cache+ Content-Type:+ - application/json+ Content-Encoding:+ - gzip+ Vary:+ - Accept-Encoding+ Strict-Transport-Security:+ - max-age=31536000+ Request-Id:+ - dc956544-24d3-4ab0-87d4-fd372fa23de3+ Client-Request-Id:+ - dc956544-24d3-4ab0-87d4-fd372fa23de3+ X-Ms-Ags-Diagnostic:+ - '{"ServerInfo":{"DataCenter":"Germany West Central","Slice":"E","Ring":"4","ScaleUnit":"007","RoleInstance":"FR2PEPF00000C2A"}}'+ Splogid:+ - 7cc3cca1-104c-0000-83a4-a85ca8cb598c+ Date:+ - Mon, 06 Oct 2025 15:01:42 GMT+ body:+ encoding: UTF-8+ string: '{"error":{"code":"generalException","message":"General exception while+ processing","innerError":{"date":"2025-10-06T15:01:42","request-id":"dc956544-24d3-4ab0-87d4-fd372fa23de3","client-request-id":"dc956544-24d3-4ab0-87d4-fd372fa23de3"}}}'+ recorded_at: Mon, 06 Oct 2025 15:01:42 GMT+recorded_with: VCR 6.3.1diff --git a/modules/storages/spec/support/fixtures/vcr_cassettes/sharepoint/copy_template_source_not_found.yml b/modules/storages/spec/support/fixtures/vcr_cassettes/sharepoint/copy_template_source_not_found.ymlnew file mode 100644index 00000000000..95d8e3f6705--- /dev/null+++ b/modules/storages/spec/support/fixtures/vcr_cassettes/sharepoint/copy_template_source_not_found.yml@@ -0,0 +1,119 @@+---+http_interactions:+- request:+ method: post+ uri: https://login.microsoftonline.com/e36f1dbc-fdae-427e-b61b-0d96ddfb81a4/oauth2/v2.0/token+ body:+ encoding: ASCII-8BIT+ string: grant_type=client_credentials&scope=https%3A%2F%2Fgraph.microsoft.com%2F.default+offline_access&client_id=404e0567-19a1-4a64-b2d1-d3b0c99f2ed9&client_secret=QRB8Q%7Ei.1rID_.MC9FTfRGq-FTE5SgWYsoeLacWf+ headers:+ User-Agent:+ - httpx.rb/1.6.2+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ Content-Type:+ - application/x-www-form-urlencoded+ Content-Length:+ - '199'+ response:+ status:+ code: 200+ message: OK+ headers:+ Cache-Control:+ - no-store, no-cache+ Pragma:+ - no-cache+ Content-Type:+ - application/json; charset=utf-8+ Expires:+ - "-1"+ Strict-Transport-Security:+ - max-age=31536000; includeSubDomains+ X-Content-Type-Options:+ - nosniff+ P3p:+ - CP="DSP CUR OTPi IND OTRi ONL FIN"+ X-Ms-Request-Id:+ - 2e328093-51fd-4a17-823e-2e5646df8000+ X-Ms-Ests-Server:+ - 2.1.22024.3 - FRC ProdSlices+ X-Ms-Srs:+ - 1.P+ Content-Security-Policy-Report-Only:+ - object-src 'none'; base-uri 'self'; script-src 'self' 'nonce-yxPbOsoBuy55zX2MxPQuWg'+ 'unsafe-inline' 'unsafe-eval' https://*.msauth.net https://*.msftauth.net+ https://*.msftauthimages.net https://*.msauthimages.net https://*.msidentity.com+ https://*.microsoftonline-p.com https://*.microsoftazuread-sso.com https://*.azureedge.net+ https://*.outlook.com https://*.office.com https://*.office365.com https://*.microsoft.com+ https://*.bing.com 'report-sample'; report-uri https://csp.microsoft.com/report/ESTS-UX-All+ Cross-Origin-Opener-Policy-Report-Only:+ - same-origin; report-to="coop-endpoint"+ Reporting-Endpoints:+ - coop-endpoint="https://idux.azurewebsites.net/api/coopReport"+ X-Xss-Protection:+ - '0'+ Set-Cookie:+ - fpc=AvPcbYAW2AdDpKtUSq_pU35Z-dCOAQAAACHQdeAOAAAA; expires=Wed, 05-Nov-2025+ 14:58:42 GMT; path=/; secure; HttpOnly; SameSite=None, x-ms-gateway-slice=estsfd;+ path=/; secure; samesite=none; httponly, stsservicecookie=estsfd; path=/;+ secure; samesite=none; httponly+ Date:+ - Mon, 06 Oct 2025 14:58:42 GMT+ Content-Length:+ - '2035'+ body:+ encoding: UTF-8+ string: '{"token_type":"Bearer","expires_in":3599,"ext_expires_in":3599,"access_token":"<ACCESS_TOKEN>"}'+ recorded_at: Mon, 06 Oct 2025 14:58:42 GMT+- request:+ method: post+ uri: https://graph.microsoft.com/v1.0/drives/b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY9jo6leJDqrT7muzvmiWjFW/items/TheCakeIsALie/[email protected]=fail+ body:+ encoding: UTF-8+ string: '{"name":"Not Happening"}'+ headers:+ User-Agent:+ - httpx.rb/1.6.2+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ Content-Type:+ - application/json; charset=utf-8+ Content-Length:+ - '24'+ Authorization:+ - Bearer <BEARER TOKEN>+ response:+ status:+ code: 404+ message: Not Found+ headers:+ Cache-Control:+ - no-store, no-cache+ Content-Type:+ - application/json+ Content-Encoding:+ - gzip+ Vary:+ - Accept-Encoding+ Strict-Transport-Security:+ - max-age=31536000+ Request-Id:+ - 6e8d6028-67b8-4069-8519-48783c47ae17+ Client-Request-Id:+ - 6e8d6028-67b8-4069-8519-48783c47ae17+ X-Ms-Ags-Diagnostic:+ - '{"ServerInfo":{"DataCenter":"Germany West Central","Slice":"E","Ring":"4","ScaleUnit":"007","RoleInstance":"FR2PEPF00000C34"}}'+ Splogid:+ - 50c3cca1-9066-0000-8a5a-65d19d7f22d6+ Date:+ - Mon, 06 Oct 2025 14:58:42 GMT+ body:+ encoding: UTF-8+ string: '{"error":{"code":"itemNotFound","message":"Item not found","innerError":{"date":"2025-10-06T14:58:42","request-id":"6e8d6028-67b8-4069-8519-48783c47ae17","client-request-id":"6e8d6028-67b8-4069-8519-48783c47ae17"}}}'+ recorded_at: Mon, 06 Oct 2025 14:58:42 GMT+recorded_with: VCR 6.3.1