Skip to main content

While i was working on Box Preservations Im stucked while assigning the Hold policy to user / folder with the following endpoint.
https://{{api.box.com}}/2.0/legal_hold_policy_assignments
Payload: {
  "policy_id": "3710887",
  "assign_to": {
    "type": "user",
    "id": "2262844940"
  }
}
The access token was generated with all the scopes mentioned as below
root_readwrite manage_app_users manage_groups enterprise_content manage_legal_holds manage_legal_hold_policies manage_legal_hold_policy_assignmentspolicy creation is working fine with the app Onna Enterprise nStage]. But this is failing with error {
    "type": "error",
    "status": 403,
    "code": "access_denied_insufficient_permissions",
    "help_url": "http://developers.box.com/docs/#errors",
    "message": "Access denied - insufficient permission",
    "request_id": "w42h6ui2xemxd8tt"
}As i tried to research on this i came to know that we have to raise a support ticket to Box to enable manage_legal_hold_policies manage_legal_hold_policy_assignments scopes.
and 
Request:
endpoint = f"legal_hold_policies/{policy_id}"

return await self._call_api(endpoint, method="get")

Response:

    raise Exception(f"API Error {response.status}: {body}")
Exception: API Error 403: {"type":"error","status":403,"code":"access_denied_insufficient_permissions","help_url":"http:\/\/developers.box.com\/docs\/#errors","message":"Access denied - insufficient permission","request_id":"rpsmx9i3h3sm1s19"}

Seems missing read legal hold policy permission 

Be the first to reply!

Reply