RevokeAccessRequest Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Contains the data that is needed to replace the access rights on the target record for the specified security principal (user, team, or organization).
public ref class RevokeAccessRequest sealed : Microsoft::Xrm::Sdk::OrganizationRequest
[System.Runtime.Serialization.DataContract(Namespace="http://schemas.microsoft.com/crm/2011/Contracts")]
public sealed class RevokeAccessRequest : Microsoft.Xrm.Sdk.OrganizationRequest
[<System.Runtime.Serialization.DataContract(Namespace="http://schemas.microsoft.com/crm/2011/Contracts")>]
type RevokeAccessRequest = class
inherit OrganizationRequest
Public NotInheritable Class RevokeAccessRequest
Inherits OrganizationRequest
- Inheritance
- Attributes
Examples
The following example shows how to use this message. For this sample to work correctly, you must have an authenticated connection to the server with a client that implements the IOrganizationService interface instance.
/// <summary>
/// Revokes a user's access to a record.
/// </summary>
/// <param name="service">Authenticated client implementing the IOrganizationService interface</param>
/// <param name="target">The record to revoke access to</param>
/// <param name="revokee">The security principal to revoke access from</param>
public static void RevokeAccessExample(
IOrganizationService service,
EntityReference target,
EntityReference revokee)
{
var request = new RevokeAccessRequest
{
Target = target,
Revokee = revokee
};
// RevokeAccessResponse doesn't return any values
service.Execute(request);
}
Remarks
For the Web API use the RevokeAccess action.
Usage
Pass an instance of this class to the Execute(OrganizationRequest) method, which returns an instance of the RevokeAccessResponse class.
Privileges and Access Rights
To perform this action, the caller must have privileges on the specified entity in the Target property and access rights on the specified record in the Target property.
Notes for Callers
This action also applies to all child records of the target record. However for all child records, access rights are only modified if the caller has share privileges for those entity types and share access rights to the records. As a result, the owner of the target record, or a security principal who shares the target record, automatically has share rights to all child records of the target record.
For a description of how actions on a parent record affect child records, see Configure table relationship cascading behavior.
See Message support for tables for an example query you can use to get the list of tables you can use with the RevokeAccess
message.
Constructors
RevokeAccessRequest() |
Initializes a new instance of the RevokeAccessRequest class. |
Properties
ExtensionData |
Gets or sets the structure that contains extra data. Optional. (Inherited from OrganizationRequest) |
Item[String] |
Gets or sets the indexer for the |
Parameters |
Gets or sets the collection of parameters for the request. Required, but is supplied by derived classes. (Inherited from OrganizationRequest) |
RequestId |
Gets or sets the ID of the request. Optional. (Inherited from OrganizationRequest) |
RequestName |
Gets or sets the name of the request. Required, but is supplied by derived classes. (Inherited from OrganizationRequest) |
Revokee |
Gets or sets a security principal (user, team, or organization) whose access you want to revoke. Required. |
Target |
Gets or sets the target record for which you want to revoke access. Required. |