-
-
Save furkankaracan/5b690ed77cfd6ddbc9f1fdd89dd15e58 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Revokes access to a shared record. | |
/// </summary> | |
/// <param name="service">Authenticated client implementing the IOrganizationService interface</param> | |
/// <param name="principal">The user, team, or organization to revoke rights to the shared record.</param> | |
/// <param name="record">The shared record</param> | |
static void RevokeShare( | |
IOrganizationService service, | |
EntityReference principal, | |
EntityReference record) | |
{ | |
RevokeAccessRequest request = new() | |
{ | |
Revokee = principal, | |
Target = record | |
}; | |
service.Execute(request); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment