"One of the provided arguments is not acceptable." when I try to update a share link permission

Viewed 517

According to the article here: https://docs.microsoft.com/en-us/graph/api/permission-update

I'm trying to update the permission for a share link in OneDrive by changing the "roles" attribute from "write" to "read", however, I'm getting always the following response:

{
  "error": {
    "code": "badArgument",
    "message": "One of the provided arguments is not acceptable.",
    "innerError": {
      "date": "2020-08-28T08:20:48",
      "request-id": "53d3a458-74e4-4f54-b322-5bb39663f0a2"
    }
  }
}

below my request:

PATCH
https://graph.microsoft.com/v1.0/sites/94a7de87-ecd9-4e1e-961b-5e59b1f0c012/drive/items/01NODCI4ESPCGY2GUN65BLN3Z3RBDTPIBT/permissions/8dd584e6-adca-4736-8e32-659ac99527bc

BODY:

{
  "roles": ["read"]
}

I'm interested to know also if is there a way to remove a single user from a share link instead of deleting it completely causing the share breaking for every user included or the only thing that we can change is the roles property?

0 Answers
Related