< Back
Revoke-CrmRecordAccess
Post
NAME Revoke-CrmRecordAccess
SYNOPSIS
Revokes (removes) access rights on the target record for the specified security principal (user or team).
SYNTAX
Revoke-CrmRecordAccess [[-conn] <CrmServiceClient>] [-CrmRecord] <PSObject[]> [-Revokee] <EntityReference>
[<CommonParameters>]
Revoke-CrmRecordAccess [[-conn] <CrmServiceClient>] [-EntityLogicalName] <String> [-Id] <Guid> [-Revokee]
<EntityReference> [<CommonParameters>]
DESCRIPTION
The Revoke-CrmRecordAccess cmdlet lets you remove a security principal's (user or team) previously granted access
to a specified record.
PARAMETERS
-conn <CrmServiceClient>
A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
Required? false
Position? 0
Default value
Accept pipeline input? false
Accept wildcard characters? false
-CrmRecord <PSObject[]>
The record object to revoke access to, obtained via Get-CrmRecord/Get-CrmRecords. When you pass CrmRecord,
then you don't use EntityLogicalName/Id.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-Revokee <EntityReference>
The principal (user or team) whose access rights are to be revoked from the record. Use New-CrmEntityReference
<Parameters> to generate it.
Required? true
Position? 3
Default value
Accept pipeline input? false
Accept wildcard characters? false
-EntityLogicalName <String>
# The logical name of an entity to revoke access to, i.e. account, contact, lead, etc.
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Id <Guid>
# The Id of a record to revoke access to.
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
NOTES
-------------------------- Example 1 --------------------------
Revoke-CrmRecordAccess -conn $conn -CrmRecord $contact -Principal $team
This example revokes a team's access rights to a contact record.
-------------------------- Example 2 --------------------------
$contact | Revoke-CrmRecordAccess -conn $conn -Principal $team
This example pipes a contact to Revoke-CrmRecordAccess and removes a team's access rights to the contact.
RELATED LINKS
SYNOPSIS
Revokes (removes) access rights on the target record for the specified security principal (user or team).
SYNTAX
Revoke-CrmRecordAccess [[-conn] <CrmServiceClient>] [-CrmRecord] <PSObject[]> [-Revokee] <EntityReference>
[<CommonParameters>]
Revoke-CrmRecordAccess [[-conn] <CrmServiceClient>] [-EntityLogicalName] <String> [-Id] <Guid> [-Revokee]
<EntityReference> [<CommonParameters>]
DESCRIPTION
The Revoke-CrmRecordAccess cmdlet lets you remove a security principal's (user or team) previously granted access
to a specified record.
PARAMETERS
-conn <CrmServiceClient>
A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.
Required? false
Position? 0
Default value
Accept pipeline input? false
Accept wildcard characters? false
-CrmRecord <PSObject[]>
The record object to revoke access to, obtained via Get-CrmRecord/Get-CrmRecords. When you pass CrmRecord,
then you don't use EntityLogicalName/Id.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-Revokee <EntityReference>
The principal (user or team) whose access rights are to be revoked from the record. Use New-CrmEntityReference
<Parameters> to generate it.
Required? true
Position? 3
Default value
Accept pipeline input? false
Accept wildcard characters? false
-EntityLogicalName <String>
# The logical name of an entity to revoke access to, i.e. account, contact, lead, etc.
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Id <Guid>
# The Id of a record to revoke access to.
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
NOTES
-------------------------- Example 1 --------------------------
Revoke-CrmRecordAccess -conn $conn -CrmRecord $contact -Principal $team
This example revokes a team's access rights to a contact record.
-------------------------- Example 2 --------------------------
$contact | Revoke-CrmRecordAccess -conn $conn -Principal $team
This example pipes a contact to Revoke-CrmRecordAccess and removes a team's access rights to the contact.
RELATED LINKS