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
Create and Delete Folder support
Marcello Rocha750ebeef4c80
diff --git a/modules/storages/app/common/storages/adapters/providers/share_point/commands/create_folder_command.rb b/modules/storages/app/common/storages/adapters/providers/share_point/commands/create_folder_command.rbnew file mode 100644index 00000000000..0db70fc6895--- /dev/null+++ b/modules/storages/app/common/storages/adapters/providers/share_point/commands/create_folder_command.rb@@ -0,0 +1,95 @@+# 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 CreateFolderCommand < Base+ def call(auth_strategy:, input_data:)+ info "Creating folder with args: #{input_data.to_h}"+ Authentication[auth_strategy].call(storage: @storage) do |http|+ handle_response http.post(+ request_uri(**split_identifier(input_data.parent_location)), json: payload(input_data.folder_name)+ )+ end+ end++ private++ def request_uri(drive_id:, location:)+ if location.root?+ UrlBuilder.url(base_uri, "/v1.0/drives", drive_id, "/root/children")+ else+ UrlBuilder.url(base_uri, "/v1.0/drives", drive_id, "/items", location.path, "/children")+ end+ end++ # rubocop:disable Metrics/AbcSize+ def handle_response(response)+ error = Results::Error.new(payload: response, source: self.class)++ case response+ in { status: 200..299 }+ info "Folder successfully created."+ StorageFileTransformer.new(site_name).transform(response.json(symbolize_keys: true))+ in { status: 400 }+ parse_invalid_request(response.json(symbolize_keys: true), error)+ in { status: 404 }+ Failure(error.with(code: :not_found))+ in { status: 401 }+ Failure(error.with(code: :unauthorized))+ in { status: 409 }+ Failure(error.with(code: :conflict))+ else+ Failure(error.with(code: :error))+ end+ end+ # rubocop:enable Metrics/AbcSize++ def parse_invalid_request(json, error)+ info "Invalid request. Response: #{json}"+ if json.dig(:error, :message)&.match? /item ID is not valid for the requested drive/i+ Failure(error.with(code: :not_found))+ else+ Failure(error.with(code: :invalid_request))+ end+ end++ def payload(folder_name)+ { name: folder_name, folder: {}, "@microsoft.graph.conflictBehavior" => "fail" }+ end+ end+ end+ end+ end+ end+enddiff --git a/modules/storages/app/common/storages/adapters/providers/share_point/commands/delete_folder_command.rb b/modules/storages/app/common/storages/adapters/providers/share_point/commands/delete_folder_command.rbnew file mode 100644index 00000000000..55f0bb5d7ba--- /dev/null+++ b/modules/storages/app/common/storages/adapters/providers/share_point/commands/delete_folder_command.rb@@ -0,0 +1,73 @@+# 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 DeleteFolderCommand < Base+ def call(auth_strategy:, input_data:)+ with_tagged_logger do+ Authentication[auth_strategy].call(storage: @storage) do |http|+ info "Deleting folder of identifier #{split_identifier(input_data.location).inspect}"+ handle_response http.delete(request_uri(**split_identifier(input_data.location)))+ end+ end+ end++ private++ def request_uri(drive_id:, location:)+ UrlBuilder.url(base_uri, "/v1.0/drives", drive_id, "/items", location.path)+ end++ def handle_response(response)+ error = Results::Error.new(source: self.class, payload: response)++ case response+ in { status: 200..299 }+ Success()+ in { status: 401 }+ Failure(error.with(code: :unauthorized))+ 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+ end+ end+ end+ end+ end+enddiff --git a/modules/storages/app/common/storages/adapters/providers/share_point/queries/files_query.rb b/modules/storages/app/common/storages/adapters/providers/share_point/queries/files_query.rbindex 7b0ce13487b..704d8f3e958 100644--- a/modules/storages/app/common/storages/adapters/providers/share_point/queries/files_query.rb+++ b/modules/storages/app/common/storages/adapters/providers/share_point/queries/files_query.rb@@ -35,8 +35,10 @@ module Storagesmodule Queriesclass FilesQuery < Basedef call(auth_strategy:, input_data:)- Authentication[auth_strategy].call(storage: @storage) do |http|- files_request(input_data.folder, http)+ with_tagged_logger do+ Authentication[auth_strategy].call(storage: @storage) do |http|+ files_request(input_data.folder, http)+ endendend@@ -44,8 +46,10 @@ module Storagesdef files_request(folder, http)if folder.root?+ info "Requesting all libraries for the SharePoint site #{site_name}"Internal::ListsQuery.call(storage: @storage, http:)else+ info "Requesting all files under composite identifier #{folder}"Internal::ChildrenQuery.call(storage: @storage, http:, **split_identifier(folder))endenddiff --git a/modules/storages/app/common/storages/adapters/providers/share_point/share_point_registry.rb b/modules/storages/app/common/storages/adapters/providers/share_point/share_point_registry.rbindex c37264df4e1..2c7d58ae67c 100644--- a/modules/storages/app/common/storages/adapters/providers/share_point/share_point_registry.rb+++ b/modules/storages/app/common/storages/adapters/providers/share_point/share_point_registry.rb@@ -38,9 +38,9 @@ module Storagesregister(:user_bound, ->(user, storage = nil) { Input::Strategy.build(key: :oauth_user_token, user:, storage:) })end- namespace("contracts") do- register(:storage, SharePointContract)- register(:general_information, SharePointContract)+ namespace("commands") do+ register(:create_folder, Commands::CreateFolderCommand)+ register(:delete_folder, Commands::DeleteFolderCommand)endnamespace("components") do@@ -59,6 +59,11 @@ module Storagesregister(:redirect_uri, Admin::RedirectUriComponent)end+ namespace("contracts") do+ register(:storage, SharePointContract)+ register(:general_information, SharePointContract)+ end+namespace("validators") doregister(:connection, Validators::ConnectionValidator)enddiff --git a/modules/storages/spec/common/storages/adapters/providers/share_point/commands/create_folder_command_spec.rb b/modules/storages/spec/common/storages/adapters/providers/share_point/commands/create_folder_command_spec.rbnew file mode 100644index 00000000000..b9d4ee53d17--- /dev/null+++ b/modules/storages/spec/common/storages/adapters/providers/share_point/commands/create_folder_command_spec.rb@@ -0,0 +1,107 @@+# 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 CreateFolderCommand, :webmock do+ let(:storage) { create(:share_point_dev_storage) }+ let(:auth_strategy) { Registry.resolve("share_point.authentication.userless").call(false) }+ let(:base_drive) { "b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY9jo6leJDqrT7muzvmiWjFW" }+ let(:input_data) { Input::CreateFolder.build(folder_name:, parent_location:).value! }++ it_behaves_like "adapter create_folder_command: basic command setup"++ context "when creating a folder in the root", vcr: "share_point/create_folder_root" do+ let(:folder_name) { "Földer CreatedBy Çommand" }+ let(:parent_location) { composite_identifier(nil) }+ let(:path) { "/Marcello%20VCR/F%C3%B6lder%20CreatedBy%20%C3%87ommand" }++ it_behaves_like "adapter create_folder_command: successful folder creation"+ end++ context "when creating a folder in a parent folder", vcr: "share_point/create_folder_parent" do+ let(:folder_name) { "Földer CreatedBy Çommand" }+ let(:parent_location) { composite_identifier("01ANJ53W7TITEF4WCHRBDKR7VMNUWZ33WD") }+ let(:path) { "/Marcello%20VCR/Folder%20with%20spaces/F%C3%B6lder%20CreatedBy%20%C3%87ommand" }++ it_behaves_like "adapter create_folder_command: successful folder creation"+ end++ context "when creating a folder in a non-existing parent folder", vcr: "share_point/create_folder_parent_not_found" do+ let(:folder_name) { "Földer CreatedBy Çommand" }+ let(:parent_location) { composite_identifier("01AZJL5PKU2WV3U3RKKFF4A7ZCWVBXRTEU") }++ it_behaves_like "adapter create_folder_command: parent not found"+ end++ context "when folder already exists", vcr: "share_point/create_folder_already_exists" do+ let(:folder_name) { "data" }+ let(:parent_location) { composite_identifier(nil) }++ it_behaves_like "adapter create_folder_command: folder already exists"+ end++ context "when trying to create a folder under the root of the site",+ vcr: "share_point/create_folder_invalid_request" do+ let(:folder_name) { "cant_do_that_folder" }+ let(:parent_location) { "/" }++ it "returns a failure" do+ result = described_class.call(storage:, auth_strategy:, input_data:)++ expect(result).to be_failure++ error = result.failure+ expect(error.code).to eq(:invalid_request)+ expect(error.source).to eq(described_class)+ end+ end++ private++ def composite_identifier(item_id) = "#{base_drive}#{SharePointStorage::IDENTIFIER_SEPARATOR}#{item_id}"++ def delete_created_folder(folder)+ Input::DeleteFolder.build(location: folder.id).bind do |input_data|+ Registry.resolve("share_point.commands.delete_folder").call(storage:, auth_strategy:, input_data:)+ end+ end+ end+ end+ end+ end+ end+enddiff --git a/modules/storages/spec/common/storages/adapters/providers/share_point/commands/delete_folder_command_spec.rb b/modules/storages/spec/common/storages/adapters/providers/share_point/commands/delete_folder_command_spec.rbnew file mode 100644index 00000000000..147f851f7dc--- /dev/null+++ b/modules/storages/spec/common/storages/adapters/providers/share_point/commands/delete_folder_command_spec.rb@@ -0,0 +1,86 @@+# 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 DeleteFolderCommand, :vcr, :webmock do+ let(:storage) { create(:share_point_dev_storage) }+ let(:auth_strategy) { Registry["share_point.authentication.userless"].call }+ let(:base_drive) { "b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY9jo6leJDqrT7muzvmiWjFW" }++ it "is registered as commands.share_point.delete_folder" do+ expect(Registry.resolve("share_point.commands.delete_folder")).to eq(described_class)+ end++ it ".call requires storage and input_data as keyword arguments" do+ expect(described_class).to respond_to(:call)++ method = described_class.method(:call)+ expect(method.parameters).to contain_exactly(%i[keyreq storage], %i[keyreq auth_strategy], %i[keyreq input_data])+ end++ it "deletes a folder", vcr: "share_point/delete_folder" do+ create_result = Input::CreateFolder+ .build(folder_name: "To Be Deleted Soon", parent_location: composite_identifier(nil))+ .bind do |input_data|+ Registry.resolve("share_point.commands.create_folder").call(storage:, auth_strategy:, input_data:)+ end++ folder = create_result.value_or { fail("Folder Creation Failed") }++ Input::DeleteFolder.build(location: folder.id).bind do |input_data|+ expect(described_class.call(storage:, auth_strategy:, input_data:)).to be_success+ end+ end++ it "when the folder is not found, returns a failure", vcr: "share_point/delete_folder_not_found" do+ result = Input::DeleteFolder.build(location: composite_identifier("NOT_HERE")).bind do |input_data|+ described_class.call(storage:, auth_strategy:, input_data:)+ end++ expect(result).to be_failure+ expect(result.failure.code).to eq(:not_found)+ end++ private++ def composite_identifier(item_id) = "#{base_drive}#{SharePointStorage::IDENTIFIER_SEPARATOR}#{item_id}"+ end+ end+ end+ end+ end+enddiff --git a/modules/storages/spec/support/fixtures/vcr_cassettes/share_point/create_folder_already_exists.yml b/modules/storages/spec/support/fixtures/vcr_cassettes/share_point/create_folder_already_exists.ymlnew file mode 100644index 00000000000..98e1daf289b--- /dev/null+++ b/modules/storages/spec/support/fixtures/vcr_cassettes/share_point/create_folder_already_exists.yml@@ -0,0 +1,115 @@+---+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.3.4+ 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:+ - 8f0f3633-efad-4803-bd3d-bb5479b30100+ X-Ms-Ests-Server:+ - 2.1.21415.9 - WEULR1 ProdSlices+ X-Ms-Srs:+ - 1.P+ Content-Security-Policy-Report-Only:+ - object-src 'none'; base-uri 'self'; script-src 'self' 'nonce-o7Pn7f2v4O1-2vX8K_znaA'+ '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+ X-Xss-Protection:+ - '0'+ Set-Cookie:+ - fpc=AlGMhWGlgbBEiTsvWCScoXhZ-dCOAQAAAJIeJOAOAAAA; expires=Thu, 04-Sep-2025+ 15:47:30 GMT; path=/; secure; HttpOnly; SameSite=None, x-ms-gateway-slice=estsfd;+ path=/; secure; samesite=none; httponly, stsservicecookie=estsfd; path=/;+ secure; samesite=none; httponly+ Date:+ - Tue, 05 Aug 2025 15:47:30 GMT+ Content-Length:+ - '1936'+ body:+ encoding: UTF-8+ string: '{"token_type":"Bearer","expires_in":3599,"ext_expires_in":3599,"access_token":"<ACCESS_TOKEN>"}'+ recorded_at: Tue, 05 Aug 2025 15:47:30 GMT+- request:+ method: post+ uri: https://graph.microsoft.com/v1.0/drives/b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY9jo6leJDqrT7muzvmiWjFW/root/children+ body:+ encoding: UTF-8+ string: '{"name":"data","folder":{},"@microsoft.graph.conflictBehavior":"fail"}'+ headers:+ User-Agent:+ - httpx.rb/1.3.4+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ Content-Type:+ - application/json; charset=utf-8+ Content-Length:+ - '70'+ Authorization:+ - Bearer <BEARER TOKEN>+ response:+ status:+ code: 409+ message: Conflict+ 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:+ - fe08ba6d-22d7-4c04-9817-16ed335026c3+ Client-Request-Id:+ - fe08ba6d-22d7-4c04-9817-16ed335026c3+ X-Ms-Ags-Diagnostic:+ - '{"ServerInfo":{"DataCenter":"Germany West Central","Slice":"E","Ring":"4","ScaleUnit":"001","RoleInstance":"FR2PEPF000001DF"}}'+ Splogid:+ - 76d1b8a1-b0ea-0000-7534-c2564e705e09+ Date:+ - Tue, 05 Aug 2025 15:47:30 GMT+ body:+ encoding: UTF-8+ string: '{"error":{"code":"nameAlreadyExists","message":"Name already exists","innerError":{"date":"2025-08-05T15:47:31","request-id":"fe08ba6d-22d7-4c04-9817-16ed335026c3","client-request-id":"fe08ba6d-22d7-4c04-9817-16ed335026c3"}}}'+ recorded_at: Tue, 05 Aug 2025 15:47:31 GMT+recorded_with: VCR 6.3.1diff --git a/modules/storages/spec/support/fixtures/vcr_cassettes/share_point/create_folder_invalid_request.yml b/modules/storages/spec/support/fixtures/vcr_cassettes/share_point/create_folder_invalid_request.ymlnew file mode 100644index 00000000000..ac20f5ec93f--- /dev/null+++ b/modules/storages/spec/support/fixtures/vcr_cassettes/share_point/create_folder_invalid_request.yml@@ -0,0 +1,112 @@+---+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.3.4+ 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:+ - 690105a8-dae7-4492-8deb-9b2cb4e74f00+ X-Ms-Ests-Server:+ - 2.1.21415.9 - SEC ProdSlices+ X-Ms-Srs:+ - 1.P+ Content-Security-Policy-Report-Only:+ - object-src 'none'; base-uri 'self'; script-src 'self' 'nonce-nTv2RxbHI_Jxp1MWUICbmQ'+ '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+ X-Xss-Protection:+ - '0'+ Set-Cookie:+ - fpc=AteLlmZ4FS5Fvb5vR32uZHFZ-dCOAQAAAEcjJOAOAAAA; expires=Thu, 04-Sep-2025+ 16:07:36 GMT; path=/; secure; HttpOnly; SameSite=None, x-ms-gateway-slice=estsfd;+ path=/; secure; samesite=none; httponly, stsservicecookie=estsfd; path=/;+ secure; samesite=none; httponly+ Date:+ - Tue, 05 Aug 2025 16:07:35 GMT+ Content-Length:+ - '1927'+ body:+ encoding: UTF-8+ string: '{"token_type":"Bearer","expires_in":3599,"ext_expires_in":3599,"access_token":"<ACCESS_TOKEN>"}'+ recorded_at: Tue, 05 Aug 2025 16:07:36 GMT+- request:+ method: post+ uri: https://graph.microsoft.com/v1.0/drives/root/children+ body:+ encoding: UTF-8+ string: '{"name":"cant_do_that_folder","folder":{},"@microsoft.graph.conflictBehavior":"fail"}'+ headers:+ User-Agent:+ - httpx.rb/1.3.4+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ Content-Type:+ - application/json; charset=utf-8+ Content-Length:+ - '85'+ Authorization:+ - Bearer <BEARER TOKEN>+ response:+ status:+ code: 400+ message: Bad Request+ headers:+ Content-Type:+ - application/json+ Content-Encoding:+ - gzip+ Vary:+ - Accept-Encoding+ Strict-Transport-Security:+ - max-age=31536000+ Request-Id:+ - d8c54aa6-82d3-4f04-a5dd-81be6d5d2827+ Client-Request-Id:+ - d8c54aa6-82d3-4f04-a5dd-81be6d5d2827+ X-Ms-Ags-Diagnostic:+ - '{"ServerInfo":{"DataCenter":"Germany West Central","Slice":"E","Ring":"4","ScaleUnit":"002","RoleInstance":"FR3PEPF00000310"}}'+ Date:+ - Tue, 05 Aug 2025 16:07:36 GMT+ body:+ encoding: UTF-8+ string: '{"error":{"code":"BadRequest","message":"Resource not found for the+ segment ''children''.","innerError":{"date":"2025-08-05T16:07:36","request-id":"d8c54aa6-82d3-4f04-a5dd-81be6d5d2827","client-request-id":"d8c54aa6-82d3-4f04-a5dd-81be6d5d2827"}}}'+ recorded_at: Tue, 05 Aug 2025 16:07:36 GMT+recorded_with: VCR 6.3.1diff --git a/modules/storages/spec/support/fixtures/vcr_cassettes/share_point/create_folder_parent.yml b/modules/storages/spec/support/fixtures/vcr_cassettes/share_point/create_folder_parent.ymlnew file mode 100644index 00000000000..0c33b442a75--- /dev/null+++ b/modules/storages/spec/support/fixtures/vcr_cassettes/share_point/create_folder_parent.yml@@ -0,0 +1,228 @@+---+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.3.4+ 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:+ - ee9c4fb8-4d71-4baf-aa3c-f3b2049d7900+ X-Ms-Ests-Server:+ - 2.1.21415.9 - SEC ProdSlices+ X-Ms-Srs:+ - 1.P+ Content-Security-Policy-Report-Only:+ - object-src 'none'; base-uri 'self'; script-src 'self' 'nonce-ixJntqWOty_JYMG-C9L7lw'+ '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+ X-Xss-Protection:+ - '0'+ Set-Cookie:+ - fpc=AujixbaA4EBHvnpxpwsdweNZ-dCOAQAAAJMeJOAOAAAA; expires=Thu, 04-Sep-2025+ 15:47:32 GMT; path=/; secure; HttpOnly; SameSite=None, x-ms-gateway-slice=estsfd;+ path=/; secure; samesite=none; httponly, stsservicecookie=estsfd; path=/;+ secure; samesite=none; httponly+ Date:+ - Tue, 05 Aug 2025 15:47:31 GMT+ Content-Length:+ - '1927'+ body:+ encoding: UTF-8+ string: '{"token_type":"Bearer","expires_in":3599,"ext_expires_in":3599,"access_token":"<ACCESS_TOKEN>"}'+ recorded_at: Tue, 05 Aug 2025 15:47:32 GMT+- request:+ method: post+ uri: https://graph.microsoft.com/v1.0/drives/b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY9jo6leJDqrT7muzvmiWjFW/items/01ANJ53W7TITEF4WCHRBDKR7VMNUWZ33WD/children+ body:+ encoding: UTF-8+ string: '{"name":"Földer CreatedBy Çommand","folder":{},"@microsoft.graph.conflictBehavior":"fail"}'+ headers:+ User-Agent:+ - httpx.rb/1.3.4+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ Content-Type:+ - application/json; charset=utf-8+ Content-Length:+ - '92'+ Authorization:+ - Bearer <BEARER TOKEN>+ response:+ status:+ code: 201+ message: Created+ headers:+ Cache-Control:+ - no-store, no-cache+ Content-Type:+ - application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8+ Content-Encoding:+ - gzip+ Etag:+ - '"{09C63FC5-26B9-4398-84C0-0D3D9B0B91B0},1"'+ Location:+ - https://ymt6d.sharepoint.com/_api/v2.0/drives('b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY9jo6leJDqrT7muzvmiWjFW')/items('01ANJ53W7TITEF4WCHRBDKR7VMNUWZ33WD')/children('01ANJ53W6FH7DATOJGTBBYJQANHWNQXENQ')+ Vary:+ - Accept-Encoding+ Strict-Transport-Security:+ - max-age=31536000+ Request-Id:+ - a0bd94f1-ea7c-4060-a55b-0ee9ec5152af+ Client-Request-Id:+ - a0bd94f1-ea7c-4060-a55b-0ee9ec5152af+ X-Ms-Ags-Diagnostic:+ - '{"ServerInfo":{"DataCenter":"Germany West Central","Slice":"E","Ring":"4","ScaleUnit":"001","RoleInstance":"FR2PEPF00000400"}}'+ Splogid:+ - 77d1b8a1-304d-0000-7534-c88e2ecea9f5+ Odata-Version:+ - '4.0'+ Date:+ - Tue, 05 Aug 2025 15:47:32 GMT+ body:+ encoding: UTF-8+ string: '{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#drives(''b%21FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY9jo6leJDqrT7muzvmiWjFW'')/items(''01ANJ53W7TITEF4WCHRBDKR7VMNUWZ33WD'')/children/$entity","@odata.etag":"\"{09C63FC5-26B9-4398-84C0-0D3D9B0B91B0},1\"","eTag":"\"{09C63FC5-26B9-4398-84C0-0D3D9B0B91B0},1\"","lastModifiedDateTime":"2025-08-05T15:47:33Z","createdDateTime":"2025-08-05T15:47:33Z","id":"01ANJ53W6FH7DATOJGTBBYJQANHWNQXENQ","name":"Földer+ CreatedBy Çommand","size":0,"webUrl":"https://ymt6d.sharepoint.com/sites/OPTest/Marcello%20VCR/Folder%20with%20spaces/F%C3%B6lder%20CreatedBy%20%C3%87ommand","cTag":"\"c:{09C63FC5-26B9-4398-84C0-0D3D9B0B91B0},0\"","commentSettings":{"commentingDisabled":{"isDisabled":false}},"createdBy":{"application":{"displayName":"OP+ Selected","id":"404e0567-19a1-4a64-b2d1-d3b0c99f2ed9"},"user":{"displayName":"SharePoint+ App"}},"lastModifiedBy":{"application":{"displayName":"OP Selected","id":"404e0567-19a1-4a64-b2d1-d3b0c99f2ed9"},"user":{"displayName":"SharePoint+ App"}},"parentReference":{"driveId":"b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY9jo6leJDqrT7muzvmiWjFW","driveType":"documentLibrary","id":"01ANJ53W7TITEF4WCHRBDKR7VMNUWZ33WD","path":"/drives/b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY9jo6leJDqrT7muzvmiWjFW/root:/Folder+ with spaces","sharepointIds":{"listId":"5ea9a363-3a24-4fab-b9ae-cef9a25a3156","listItemUniqueId":"5ec844f3-4758-4688-a8fe-ac6d2d9deec3","siteId":"1099e315-d0c7-47c7-8640-aa9504b70fff","siteUrl":"https://ymt6d.sharepoint.com/sites/OPTest","tenantId":"e36f1dbc-fdae-427e-b61b-0d96ddfb81a4","webId":"6af246f0-e3be-45ef-b91a-8eca4dcc5d8f"}},"fileSystemInfo":{"createdDateTime":"2025-08-05T15:47:33Z","lastModifiedDateTime":"2025-08-05T15:47:33Z"},"folder":{"childCount":0},"shared":{"scope":"unknown"}}'+ recorded_at: Tue, 05 Aug 2025 15:47:33 GMT+- 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.3.4+ 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:+ - 26b62d64-c484-494d-8bc8-7ea8d5b08500+ X-Ms-Ests-Server:+ - 2.1.21415.9 - WEULR1 ProdSlices+ X-Ms-Srs:+ - 1.P+ Content-Security-Policy-Report-Only:+ - object-src 'none'; base-uri 'self'; script-src 'self' 'nonce-l6s5nFofG4wNKNEUQAxcaw'+ '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+ X-Xss-Protection:+ - '0'+ Set-Cookie:+ - fpc=AiWnJEARS41Ov6UYa9mKa51Z-dCOAQAAAJUeJOAOAAAA; expires=Thu, 04-Sep-2025+ 15:47:33 GMT; path=/; secure; HttpOnly; SameSite=None, x-ms-gateway-slice=estsfd;+ path=/; secure; samesite=none; httponly, stsservicecookie=estsfd; path=/;+ secure; samesite=none; httponly+ Date:+ - Tue, 05 Aug 2025 15:47:32 GMT+ Content-Length:+ - '1932'+ body:+ encoding: UTF-8+ string: '{"token_type":"Bearer","expires_in":3599,"ext_expires_in":3599,"access_token":"<ACCESS_TOKEN>"}'+ recorded_at: Tue, 05 Aug 2025 15:47:33 GMT+- request:+ method: delete+ uri: https://graph.microsoft.com/v1.0/drives/b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY9jo6leJDqrT7muzvmiWjFW/items/01ANJ53W6FH7DATOJGTBBYJQANHWNQXENQ+ body:+ encoding: US-ASCII+ string: ''+ headers:+ User-Agent:+ - httpx.rb/1.3.4+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ Authorization:+ - Bearer <BEARER TOKEN>+ response:+ status:+ code: 204+ message: No Content+ headers:+ Cache-Control:+ - no-store, no-cache+ Strict-Transport-Security:+ - max-age=31536000+ Request-Id:+ - 49c6c2a7-0538-4ab8-96ca-80e087f24b5f+ Client-Request-Id:+ - 49c6c2a7-0538-4ab8-96ca-80e087f24b5f+ X-Ms-Ags-Diagnostic:+ - '{"ServerInfo":{"DataCenter":"Germany West Central","Slice":"E","Ring":"4","ScaleUnit":"001","RoleInstance":"FR2PEPF000001DD"}}'+ Splogid:+ - 77d1b8a1-6092-0000-7534-c45d58130157+ Date:+ - Tue, 05 Aug 2025 15:47:33 GMT+ body:+ encoding: UTF-8+ string: ''+ recorded_at: Tue, 05 Aug 2025 15:47:33 GMT+recorded_with: VCR 6.3.1diff --git a/modules/storages/spec/support/fixtures/vcr_cassettes/share_point/create_folder_parent_not_found.yml b/modules/storages/spec/support/fixtures/vcr_cassettes/share_point/create_folder_parent_not_found.ymlnew file mode 100644index 00000000000..78f83cded0c--- /dev/null+++ b/modules/storages/spec/support/fixtures/vcr_cassettes/share_point/create_folder_parent_not_found.yml@@ -0,0 +1,116 @@+---+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.3.4+ 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:+ - 24c1f588-bd11-4e47-8544-c40c6a387300+ X-Ms-Ests-Server:+ - 2.1.21415.9 - FRC ProdSlices+ X-Ms-Srs:+ - 1.P+ Content-Security-Policy-Report-Only:+ - object-src 'none'; base-uri 'self'; script-src 'self' 'nonce-AjJxOpPrWqM-5FL7fqkp0A'+ '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+ X-Xss-Protection:+ - '0'+ Set-Cookie:+ - fpc=Aq7PuHsUOOBKtpvYfgHqDFxZ-dCOAQAAAA4fJOAOAAAA; expires=Thu, 04-Sep-2025+ 15:49:34 GMT; path=/; secure; HttpOnly; SameSite=None, x-ms-gateway-slice=estsfd;+ path=/; secure; samesite=none; httponly, stsservicecookie=estsfd; path=/;+ secure; samesite=none; httponly+ Date:+ - Tue, 05 Aug 2025 15:49:34 GMT+ Content-Length:+ - '1932'+ body:+ encoding: UTF-8+ string: '{"token_type":"Bearer","expires_in":3599,"ext_expires_in":3599,"access_token":"<ACCESS_TOKEN>"}'+ recorded_at: Tue, 05 Aug 2025 15:49:34 GMT+- request:+ method: post+ uri: https://graph.microsoft.com/v1.0/drives/b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY9jo6leJDqrT7muzvmiWjFW/items/01AZJL5PKU2WV3U3RKKFF4A7ZCWVBXRTEU/children+ body:+ encoding: UTF-8+ string: '{"name":"Földer CreatedBy Çommand","folder":{},"@microsoft.graph.conflictBehavior":"fail"}'+ headers:+ User-Agent:+ - httpx.rb/1.3.4+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ Content-Type:+ - application/json; charset=utf-8+ Content-Length:+ - '92'+ Authorization:+ - Bearer <BEARER TOKEN>+ response:+ status:+ code: 400+ message: Bad Request+ 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:+ - 704b37c1-eb8b-4f38-8cee-1541f58c2aa2+ Client-Request-Id:+ - 704b37c1-eb8b-4f38-8cee-1541f58c2aa2+ X-Ms-Ags-Diagnostic:+ - '{"ServerInfo":{"DataCenter":"Germany West Central","Slice":"E","Ring":"4","ScaleUnit":"001","RoleInstance":"FR2PEPF000001EE"}}'+ Splogid:+ - 95d1b8a1-e02c-0000-7534-c5a50f80f28b+ Date:+ - Tue, 05 Aug 2025 15:49:34 GMT+ body:+ encoding: UTF-8+ string: '{"error":{"code":"invalidRequest","message":"The provided item ID is+ not valid for the requested drive","innerError":{"date":"2025-08-05T15:49:35","request-id":"704b37c1-eb8b-4f38-8cee-1541f58c2aa2","client-request-id":"704b37c1-eb8b-4f38-8cee-1541f58c2aa2"}}}'+ recorded_at: Tue, 05 Aug 2025 15:49:35 GMT+recorded_with: VCR 6.3.1diff --git a/modules/storages/spec/support/fixtures/vcr_cassettes/share_point/create_folder_root.yml b/modules/storages/spec/support/fixtures/vcr_cassettes/share_point/create_folder_root.ymlnew file mode 100644index 00000000000..5158acf7f71--- /dev/null+++ b/modules/storages/spec/support/fixtures/vcr_cassettes/share_point/create_folder_root.yml@@ -0,0 +1,227 @@+---+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.3.4+ 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:+ - c05a9ab6-059f-435e-9ea4-71c334e00000+ X-Ms-Ests-Server:+ - 2.1.21415.9 - WEULR1 ProdSlices+ X-Ms-Srs:+ - 1.P+ Content-Security-Policy-Report-Only:+ - object-src 'none'; base-uri 'self'; script-src 'self' 'nonce-8VERIVRleoapWQZXjrKZeg'+ '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+ X-Xss-Protection:+ - '0'+ Set-Cookie:+ - fpc=AnnpkWkwmu5ItkpwS-BlvCVZ-dCOAQAAAFEeJOAOAAAA; expires=Thu, 04-Sep-2025+ 15:46:26 GMT; path=/; secure; HttpOnly; SameSite=None, x-ms-gateway-slice=estsfd;+ path=/; secure; samesite=none; httponly, stsservicecookie=estsfd; path=/;+ secure; samesite=none; httponly+ Date:+ - Tue, 05 Aug 2025 15:46:25 GMT+ Content-Length:+ - '1932'+ body:+ encoding: UTF-8+ string: '{"token_type":"Bearer","expires_in":3599,"ext_expires_in":3599,"access_token":"<ACCESS_TOKEN>"}'+ recorded_at: Tue, 05 Aug 2025 15:46:26 GMT+- request:+ method: post+ uri: https://graph.microsoft.com/v1.0/drives/b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY9jo6leJDqrT7muzvmiWjFW/root/children+ body:+ encoding: UTF-8+ string: '{"name":"Földer CreatedBy Çommand","folder":{},"@microsoft.graph.conflictBehavior":"fail"}'+ headers:+ User-Agent:+ - httpx.rb/1.3.4+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ Content-Type:+ - application/json; charset=utf-8+ Content-Length:+ - '92'+ Authorization:+ - Bearer <BEARER TOKEN>+ response:+ status:+ code: 201+ message: Created+ headers:+ Cache-Control:+ - no-store, no-cache+ Content-Type:+ - application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8+ Content-Encoding:+ - gzip+ Etag:+ - '"{89DF0E55-C3F0-4A79-A3C0-72EC24E3A7E7},1"'+ Location:+ - https://ymt6d.sharepoint.com/_api/v2.0/drives('b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY9jo6leJDqrT7muzvmiWjFW')/items('root')/children('01ANJ53W2VB3PYT4GDPFFKHQDS5QSOHJ7H')+ Vary:+ - Accept-Encoding+ Strict-Transport-Security:+ - max-age=31536000+ Request-Id:+ - 1dc0f44c-dcd9-4fa9-8ccd-4090a39f2ea7+ Client-Request-Id:+ - 1dc0f44c-dcd9-4fa9-8ccd-4090a39f2ea7+ X-Ms-Ags-Diagnostic:+ - '{"ServerInfo":{"DataCenter":"Germany West Central","Slice":"E","Ring":"4","ScaleUnit":"005","RoleInstance":"FR3PEPF00000D06"}}'+ Splogid:+ - 67d1b8a1-1027-0000-7a8c-c8bb2a77bb47+ Odata-Version:+ - '4.0'+ Date:+ - Tue, 05 Aug 2025 15:46:26 GMT+ body:+ encoding: UTF-8+ string: '{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#drives(''b%21FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY9jo6leJDqrT7muzvmiWjFW'')/root/children/$entity","@odata.etag":"\"{89DF0E55-C3F0-4A79-A3C0-72EC24E3A7E7},1\"","eTag":"\"{89DF0E55-C3F0-4A79-A3C0-72EC24E3A7E7},1\"","lastModifiedDateTime":"2025-08-05T15:46:27Z","createdDateTime":"2025-08-05T15:46:27Z","id":"01ANJ53W2VB3PYT4GDPFFKHQDS5QSOHJ7H","name":"Földer+ CreatedBy Çommand","size":0,"webUrl":"https://ymt6d.sharepoint.com/sites/OPTest/Marcello%20VCR/F%C3%B6lder%20CreatedBy%20%C3%87ommand","cTag":"\"c:{89DF0E55-C3F0-4A79-A3C0-72EC24E3A7E7},0\"","commentSettings":{"commentingDisabled":{"isDisabled":false}},"createdBy":{"application":{"displayName":"OP+ Selected","id":"404e0567-19a1-4a64-b2d1-d3b0c99f2ed9"},"user":{"displayName":"SharePoint+ App"}},"lastModifiedBy":{"application":{"displayName":"OP Selected","id":"404e0567-19a1-4a64-b2d1-d3b0c99f2ed9"},"user":{"displayName":"SharePoint+ App"}},"parentReference":{"driveId":"b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY9jo6leJDqrT7muzvmiWjFW","driveType":"documentLibrary","id":"01ANJ53W56Y2GOVW7725BZO354PWSELRRZ","path":"/drives/b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY9jo6leJDqrT7muzvmiWjFW/root:","sharepointIds":{"listId":"5ea9a363-3a24-4fab-b9ae-cef9a25a3156","listItemUniqueId":"6bc8b02c-f419-4bec-8531-be5b69948a7d","siteId":"1099e315-d0c7-47c7-8640-aa9504b70fff","siteUrl":"https://ymt6d.sharepoint.com/sites/OPTest","tenantId":"e36f1dbc-fdae-427e-b61b-0d96ddfb81a4","webId":"6af246f0-e3be-45ef-b91a-8eca4dcc5d8f"}},"fileSystemInfo":{"createdDateTime":"2025-08-05T15:46:27Z","lastModifiedDateTime":"2025-08-05T15:46:27Z"},"folder":{"childCount":0},"shared":{"scope":"unknown"}}'+ recorded_at: Tue, 05 Aug 2025 15:46:27 GMT+- 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.3.4+ 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:+ - eb446cd9-4aaf-4010-9603-4991bc647d00+ X-Ms-Ests-Server:+ - 2.1.21415.9 - NEULR1 ProdSlices+ X-Ms-Srs:+ - 1.P+ Content-Security-Policy-Report-Only:+ - object-src 'none'; base-uri 'self'; script-src 'self' 'nonce-UcdJELxLdEYEWVb3-jp5hw'+ '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+ X-Xss-Protection:+ - '0'+ Set-Cookie:+ - fpc=ArvBonaUtddJidETPWmJophZ-dCOAQAAAFIeJOAOAAAA; expires=Thu, 04-Sep-2025+ 15:46:27 GMT; path=/; secure; HttpOnly; SameSite=None, x-ms-gateway-slice=estsfd;+ path=/; secure; samesite=none; httponly, stsservicecookie=estsfd; path=/;+ secure; samesite=none; httponly+ Date:+ - Tue, 05 Aug 2025 15:46:26 GMT+ Content-Length:+ - '1935'+ body:+ encoding: UTF-8+ string: '{"token_type":"Bearer","expires_in":3599,"ext_expires_in":3599,"access_token":"<ACCESS_TOKEN>"}'+ recorded_at: Tue, 05 Aug 2025 15:46:27 GMT+- request:+ method: delete+ uri: https://graph.microsoft.com/v1.0/drives/b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY9jo6leJDqrT7muzvmiWjFW/items/01ANJ53W2VB3PYT4GDPFFKHQDS5QSOHJ7H+ body:+ encoding: US-ASCII+ string: ''+ headers:+ User-Agent:+ - httpx.rb/1.3.4+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ Authorization:+ - Bearer <BEARER TOKEN>+ response:+ status:+ code: 204+ message: No Content+ headers:+ Cache-Control:+ - no-store, no-cache+ Strict-Transport-Security:+ - max-age=31536000+ Request-Id:+ - 6d3df34a-57be-42f3-878c-63afaa7a1694+ Client-Request-Id:+ - 6d3df34a-57be-42f3-878c-63afaa7a1694+ X-Ms-Ags-Diagnostic:+ - '{"ServerInfo":{"DataCenter":"Germany West Central","Slice":"E","Ring":"4","ScaleUnit":"005","RoleInstance":"FR3PEPF00000449"}}'+ Splogid:+ - 67d1b8a1-006d-0000-7a8c-c67f96bb08d5+ Date:+ - Tue, 05 Aug 2025 15:46:27 GMT+ body:+ encoding: UTF-8+ string: ''+ recorded_at: Tue, 05 Aug 2025 15:46:27 GMT+recorded_with: VCR 6.3.1diff --git a/modules/storages/spec/support/fixtures/vcr_cassettes/share_point/delete_folder.yml b/modules/storages/spec/support/fixtures/vcr_cassettes/share_point/delete_folder.ymlnew file mode 100644index 00000000000..9b624876b84--- /dev/null+++ b/modules/storages/spec/support/fixtures/vcr_cassettes/share_point/delete_folder.yml@@ -0,0 +1,163 @@+---+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.3.4+ 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:+ - 3f1559eb-f453-4f96-95af-8c5c4ab07200+ X-Ms-Ests-Server:+ - 2.1.21415.9 - FRC ProdSlices+ X-Ms-Srs:+ - 1.P+ Content-Security-Policy-Report-Only:+ - object-src 'none'; base-uri 'self'; script-src 'self' 'nonce-GiRUy-I7xL2hu7dE6wcL8w'+ '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+ X-Xss-Protection:+ - '0'+ Set-Cookie:+ - fpc=AlqttN0UX35JibdtGsqkG1BZ-dCOAQAAAIUkJOAOAAAA; expires=Thu, 04-Sep-2025+ 16:12:53 GMT; path=/; secure; HttpOnly; SameSite=None, x-ms-gateway-slice=estsfd;+ path=/; secure; samesite=none; httponly, stsservicecookie=estsfd; path=/;+ secure; samesite=none; httponly+ Date:+ - Tue, 05 Aug 2025 16:12:53 GMT+ Content-Length:+ - '1927'+ body:+ encoding: UTF-8+ string: '{"token_type":"Bearer","expires_in":3599,"ext_expires_in":3599,"access_token":"<ACCESS_TOKEN>"}'+ recorded_at: Tue, 05 Aug 2025 16:12:53 GMT+- request:+ method: post+ uri: https://graph.microsoft.com/v1.0/drives/b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY9jo6leJDqrT7muzvmiWjFW/root/children+ body:+ encoding: UTF-8+ string: '{"name":"To Be Deleted Soon","folder":{},"@microsoft.graph.conflictBehavior":"fail"}'+ headers:+ User-Agent:+ - httpx.rb/1.3.4+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ Content-Type:+ - application/json; charset=utf-8+ Content-Length:+ - '84'+ Authorization:+ - Bearer <BEARER TOKEN>+ response:+ status:+ code: 201+ message: Created+ headers:+ Cache-Control:+ - no-store, no-cache+ Content-Type:+ - application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8+ Content-Encoding:+ - gzip+ Etag:+ - '"{505F1555-1D41-4AD0-83C3-AEBCFFC8F29D},1"'+ Location:+ - https://ymt6d.sharepoint.com/_api/v2.0/drives('b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY9jo6leJDqrT7muzvmiWjFW')/items('root')/children('01ANJ53W2VCVPVAQI52BFIHQ5OXT74R4U5')+ Vary:+ - Accept-Encoding+ Strict-Transport-Security:+ - max-age=31536000+ Request-Id:+ - 03ed6d64-bb4d-4045-b85e-2f9350d784f6+ Client-Request-Id:+ - 03ed6d64-bb4d-4045-b85e-2f9350d784f6+ X-Ms-Ags-Diagnostic:+ - '{"ServerInfo":{"DataCenter":"Germany West Central","Slice":"E","Ring":"4","ScaleUnit":"003","RoleInstance":"FR1PEPF00000AF7"}}'+ Splogid:+ - ead2b8a1-c09b-0000-7534-cea65ff878dd+ Odata-Version:+ - '4.0'+ Date:+ - Tue, 05 Aug 2025 16:12:53 GMT+ body:+ encoding: UTF-8+ string: '{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#drives(''b%21FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY9jo6leJDqrT7muzvmiWjFW'')/root/children/$entity","@odata.etag":"\"{505F1555-1D41-4AD0-83C3-AEBCFFC8F29D},1\"","eTag":"\"{505F1555-1D41-4AD0-83C3-AEBCFFC8F29D},1\"","lastModifiedDateTime":"2025-08-05T16:12:54Z","createdDateTime":"2025-08-05T16:12:54Z","id":"01ANJ53W2VCVPVAQI52BFIHQ5OXT74R4U5","name":"To+ Be Deleted Soon","size":0,"webUrl":"https://ymt6d.sharepoint.com/sites/OPTest/Marcello%20VCR/To%20Be%20Deleted%20Soon","cTag":"\"c:{505F1555-1D41-4AD0-83C3-AEBCFFC8F29D},0\"","commentSettings":{"commentingDisabled":{"isDisabled":false}},"createdBy":{"application":{"displayName":"OP+ Selected","id":"404e0567-19a1-4a64-b2d1-d3b0c99f2ed9"},"user":{"displayName":"SharePoint+ App"}},"lastModifiedBy":{"application":{"displayName":"OP Selected","id":"404e0567-19a1-4a64-b2d1-d3b0c99f2ed9"},"user":{"displayName":"SharePoint+ App"}},"parentReference":{"driveId":"b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY9jo6leJDqrT7muzvmiWjFW","driveType":"documentLibrary","id":"01ANJ53W56Y2GOVW7725BZO354PWSELRRZ","path":"/drives/b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY9jo6leJDqrT7muzvmiWjFW/root:","sharepointIds":{"listId":"5ea9a363-3a24-4fab-b9ae-cef9a25a3156","listItemUniqueId":"6bc8b02c-f419-4bec-8531-be5b69948a7d","siteId":"1099e315-d0c7-47c7-8640-aa9504b70fff","siteUrl":"https://ymt6d.sharepoint.com/sites/OPTest","tenantId":"e36f1dbc-fdae-427e-b61b-0d96ddfb81a4","webId":"6af246f0-e3be-45ef-b91a-8eca4dcc5d8f"}},"fileSystemInfo":{"createdDateTime":"2025-08-05T16:12:54Z","lastModifiedDateTime":"2025-08-05T16:12:54Z"},"folder":{"childCount":0},"shared":{"scope":"unknown"}}'+ recorded_at: Tue, 05 Aug 2025 16:12:53 GMT+- request:+ method: delete+ uri: https://graph.microsoft.com/v1.0/drives/b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY9jo6leJDqrT7muzvmiWjFW/items/01ANJ53W2VCVPVAQI52BFIHQ5OXT74R4U5+ body:+ encoding: US-ASCII+ string: ''+ headers:+ Authorization:+ - Bearer <BEARER TOKEN>+ User-Agent:+ - httpx.rb/1.3.4+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ response:+ status:+ code: 204+ message: No Content+ headers:+ Cache-Control:+ - no-store, no-cache+ Strict-Transport-Security:+ - max-age=31536000+ Request-Id:+ - 152c66bf-a825-4d8d-9179-78fbcb9a7efc+ Client-Request-Id:+ - 152c66bf-a825-4d8d-9179-78fbcb9a7efc+ X-Ms-Ags-Diagnostic:+ - '{"ServerInfo":{"DataCenter":"Germany West Central","Slice":"E","Ring":"4","ScaleUnit":"003","RoleInstance":"FR1PEPF00000C21"}}'+ Splogid:+ - ead2b8a1-80be-0000-7a8c-c5ad8aa0c4fa+ Date:+ - Tue, 05 Aug 2025 16:12:53 GMT+ body:+ encoding: UTF-8+ string: ''+ recorded_at: Tue, 05 Aug 2025 16:12:54 GMT+recorded_with: VCR 6.3.1diff --git a/modules/storages/spec/support/fixtures/vcr_cassettes/share_point/delete_folder_not_found.yml b/modules/storages/spec/support/fixtures/vcr_cassettes/share_point/delete_folder_not_found.ymlnew file mode 100644index 00000000000..6d2e0683f3b--- /dev/null+++ b/modules/storages/spec/support/fixtures/vcr_cassettes/share_point/delete_folder_not_found.yml@@ -0,0 +1,111 @@+---+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.3.4+ 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:+ - 6ce4aa10-73b5-42c6-9953-75ee4c024900+ X-Ms-Ests-Server:+ - 2.1.21415.9 - NEULR1 ProdSlices+ X-Ms-Srs:+ - 1.P+ Content-Security-Policy-Report-Only:+ - object-src 'none'; base-uri 'self'; script-src 'self' 'nonce-0JnbXykzycMz6UP4zb2y7w'+ '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+ X-Xss-Protection:+ - '0'+ Set-Cookie:+ - fpc=AsFTZ8hHIXhMl1z1lO4XpkZZ-dCOAQAAAF8kJOAOAAAA; expires=Thu, 04-Sep-2025+ 16:12:16 GMT; path=/; secure; HttpOnly; SameSite=None, x-ms-gateway-slice=estsfd;+ path=/; secure; samesite=none; httponly, stsservicecookie=estsfd; path=/;+ secure; samesite=none; httponly+ Date:+ - Tue, 05 Aug 2025 16:12:15 GMT+ Content-Length:+ - '1935'+ body:+ encoding: UTF-8+ string: '{"token_type":"Bearer","expires_in":3599,"ext_expires_in":3599,"access_token":"<ACCESS_TOKEN>"}'+ recorded_at: Tue, 05 Aug 2025 16:12:16 GMT+- request:+ method: delete+ uri: https://graph.microsoft.com/v1.0/drives/b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY9jo6leJDqrT7muzvmiWjFW/items/NOT_HERE+ body:+ encoding: US-ASCII+ string: ''+ headers:+ User-Agent:+ - httpx.rb/1.3.4+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ 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:+ - 4edf28ee-675c-430a-855c-3f5b09108bfa+ Client-Request-Id:+ - 4edf28ee-675c-430a-855c-3f5b09108bfa+ X-Ms-Ags-Diagnostic:+ - '{"ServerInfo":{"DataCenter":"Germany West Central","Slice":"E","Ring":"4","ScaleUnit":"000","RoleInstance":"FR1PEPF0000102D"}}'+ Splogid:+ - e1d2b8a1-3092-0000-7534-cccacfae9a08+ Date:+ - Tue, 05 Aug 2025 16:12:16 GMT+ body:+ encoding: UTF-8+ string: '{"error":{"code":"itemNotFound","message":"Item not found","innerError":{"date":"2025-08-05T16:12:16","request-id":"4edf28ee-675c-430a-855c-3f5b09108bfa","client-request-id":"4edf28ee-675c-430a-855c-3f5b09108bfa"}}}'+ recorded_at: Tue, 05 Aug 2025 16:12:16 GMT+recorded_with: VCR 6.3.1