Skip to main content

The command to change folder owner returns 403 status

  • October 6, 2023
  • 1 reply
  • 222 views
The command to change folder owner returns 403 status
  • New Participant
  • 4 replies

Hi,

When “Restrict content creation” is enabled in the Enterprise settings, the following CLI command produces a 403 error.

$FolderID = 1234567890
$OwnerPre = 1234567891
$OwnerAft = 1234567892

$CollaborationID = box folders:collaborations:add $FolderID --as-user=$OwnerPre --role co-owner --user-id $OwnerAft --id-only
box folders:collaborations:update $CollaborationID --as-user=$OwnerPre --role owner

If I uncheck the “Restrict content creation” box, it succeeds, but is there any way to succeed with the box checked?

Sincerely,

Did this topic help you find an answer to your question?

1 reply

rbarbosa Box
  • Developer Advocate
  • 553 replies
  • October 10, 2023

Hi,

I’ve asked my folks about this situation, and we’re wondering if that folder move is at root level between the users.

Here is a quote from them:

And then they added:

To get around this is to either disable this setting momentarily when performing these ownership changes, or make sure that the source account where the ownership is being changed from is made a co-admin momentarily with Manage User or Manage Group permissions.

Let us know if this applies to your case.

Best regards


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings