I have a file on OneDrive that is labeled and encrypted with Microsoft Information Protection SDK.
I'm trying to replace this encrypted file with another one (encrypted or non-encrypted) and getting 403 Forbidden.
this is the API I'm using:
PUT /users/{user-id}/drive/items/{item-id}/content
Note that when replacing a non-encrypted file the api works perfectly fine.
I tried inspecting the token on jwt.ms and these are the permissions I have:
"Sites.Selected",
"Mail.ReadWrite",
"User.ReadWrite.All",
"Domain.ReadWrite.All",
"Calendars.Read",
"People.Read.All",
"Directory.ReadWrite.All",
"Sites.Read.All",
"Sites.ReadWrite.All",
"Sites.Manage.All",
"Files.ReadWrite.All",
"Directory.Read.All",
"User.Read.All",
"InformationProtectionContent.Write.All",
"Files.Read.All",
"Mail.Read",
"Directory.Write.Restricted",
"Calendars.ReadWrite",
"InformationProtectionPolicy.Read.All",
"Contacts.Read",
"InformationProtectionContent.Sign.All",
"Sites.FullControl.All"
can't figure why I'm getting the 403 and what permissions do I need to add, tried many but nothing changed.
Thanks