Changing owner ship of folder
I am using below code to transfer ownership of the folder . But the problem is first user becomes editor I want to make him " Co owner". How to acheieve it.
Dim coOwnerStatus = Await client.CollaborationsManager.AddCollaborationAsync(New BoxCollaborationRequest With {
.AccessibleBy = New BoxCollaborationUserRequest With {.Login = user},
.Item = New BoxRequestEntity With {.Id = FolderID, .Type = BoxType.folder},
.Role = BoxCollaborationRoles.CoOwner})
Dim OwnerStatus = Await client.CollaborationsManager.EditCollaborationAsync(New BoxCollaborationRequest With {
.AccessibleBy = New BoxCollaborationUserRequest With {.Login = user},
.Item = New BoxRequestEntity With {.Id = FolderID, .Type = BoxType.folder},
.Role = BoxCollaborationRoles.Owner,
.Id = coOwnerStatus.Id})
Post is closed for comments.
Comments
1 comment