RevokeAccessRequest Class
Applies To: Microsoft Dynamics CRM 2013, Microsoft Dynamics CRM Online
Contains the data that is needed to replace the access rights on the target record for the specified security principal (user or team).
Namespace: Microsoft.Crm.Sdk.Messages
Assembly: Microsoft.Crm.Sdk.Proxy (in Microsoft.Crm.Sdk.Proxy.dll)
Syntax
'Declaration
<DataContractAttribute(Namespace:="https://schemas.microsoft.com/crm/2011/Contracts")> _
Public NotInheritable Class RevokeAccessRequest
Inherits OrganizationRequest
[DataContractAttribute(Namespace="https://schemas.microsoft.com/crm/2011/Contracts")]
public sealed class RevokeAccessRequest : OrganizationRequest
Example
The following example shows how to use this message. For this sample to work correctly, you must be connected to the server to get an IOrganizationService interface. For the complete sample, see the link later in this topic.
// Revoke access to the lead for the second user.
var revokeUser2AccessReq = new RevokeAccessRequest
{
Revokee = systemUser2Ref,
Target = leadReference
};
Console.WriteLine("Revoking access to the lead for {0}...\r\n",
GetEntityReferenceString(systemUser2Ref));
_serviceProxy.Execute(revokeUser2AccessReq);
' Revoke access to the lead for the second user.
Dim revokeUser2AccessReq = New RevokeAccessRequest With
{
.Revokee = systemUser2Ref,
.Target = leadReference
}
Console.WriteLine("Revoking access to the lead for {0}..." & vbCrLf,
GetEntityReferenceString(systemUser2Ref))
_serviceProxy.Execute(revokeUser2AccessReq)
Remarks
Message Availability
For this message to work, the caller must be connected to the server.
Usage
Pass an instance of this class to the Execute 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. For a list of the required privileges, see RevokeAccess Privileges.
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 user 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 Cascading Behavior.
Supported Entities
The following table shows the default entities that support this message. For the listed entities, the caller must be connected to the server for this message to be available.
Entity |
---|
account |
annotation |
appointment |
campaign |
campaignactivity |
campaignresponse |
connection |
contact |
contract |
customeropportunityrole |
customerrelationship |
duplicaterule |
emailserverprofile |
fax |
goal |
goalrollupquery |
import |
importfile |
importmap |
incident |
incidentresolution |
invoice |
lead |
letter |
list |
mailbox |
mailmergetemplate |
opportunity |
opportunityclose |
orderclose |
phonecall |
processsession |
queue |
quote |
quoteclose |
recurringappointmentmaster |
report |
salesorder |
serviceappointment |
sharepointdocumentlocation |
sharepointsite |
task |
template |
userform |
userquery |
userqueryvisualization |
workflow |
Inheritance Hierarchy
System.Object
Microsoft.Xrm.Sdk.OrganizationRequest
Microsoft.Crm.Sdk.Messages.RevokeAccessRequest
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Platforms
Development Platforms
Windows Server 2008, Windows Server 2012, Windows 7 (All Versions), Windows 8 (All Versions)
Target Platforms
Windows Server 2008, ,Windows Server 2012, ,Windows 7 (All Versions),
Change History
See Also
Reference
RevokeAccessRequest Members
Microsoft.Crm.Sdk.Messages Namespace
Actions on Entity Records
RevokeAccessResponse
Other Resources
How Record-Based Security Can Be Used to Control Access to Records In Microsoft Dynamics CRM
Sample: Share Records Using GrantAccess, ModifyAccess and RevokeAccess Messages
Send comments about this topic to Microsoft.
© 2013 Microsoft Corporation. All rights reserved.