Skip to content

Commit f568ba7

Browse files
authored
Update cleanup-inherited-access.md
1 parent f51e22f commit f568ba7

1 file changed

Lines changed: 30 additions & 30 deletions

File tree

support/power-platform/power-apps/dataverse/cleanup-inherited-access.md

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: How to clean up inherited access
3-
description: Introduces how to remove inherited access for records when the cascade configuration of a table changes in Microsoft Power Apps.
3+
description: Introduces how to remove inherited access to records when the cascade configuration of a table changes in Microsoft Power Apps.
44
ms.date: 09/07/2023
55
author: paulliew
66
ms.author: paulliew
@@ -21,26 +21,26 @@ This article introduces how to remove inherited access for records when the casc
2121

2222
## Symptoms
2323

24-
After the [cascading behavior of a table relationship](/power-apps/developer/data-platform/configure-entity-relationship-cascading-behavior#reset-cascade-inherited-access) for the **Reparent** or **Share** actions is changed to **No Cascade**, users continue to have access to related records that should be removed.
24+
After the [cascading behavior of a table relationship](/power-apps/developer/data-platform/configure-entity-relationship-cascading-behavior#reset-cascade-inherited-access) for the **Reparent** or **Share** action is changed to **No Cascade**, you continue to have access to the related records that should be removed.
2525

2626
## How to verify the access to related records
2727

28-
Users may report that they have unexpected access to records. There are two ways to verify the access to related records:
28+
When you find that you have unexpected access to records, you can use the **Check Access** feature or the `RetrieveAccessOrigin message` to verify the access to the related records.
2929

3030
#### Use the Check Access feature
3131

32-
Use the [Check Access](/power-apps/user/access-checker) in model-driven apps to check who has access to a record. Administrators can use this feature to check individual users or all users who have access to a record.
32+
Use the [Check Access](/power-apps/user/access-checker) feature in model-driven apps to check who has access to a record. Administrators can use this feature to check individual users or all users who have access to a record.
3333

3434
When using the access checker, you see a list of reasons why a user has access. Some of these reasons indicate that the sharing was granted due to access to a related record. For example:
3535

3636
- Record was shared with me because I have access to related record.
37-
- Record was shared with a team(s) that I'm a member of because the team has access to related record.
37+
- Record was shared with team(s) that I'm a member of because the team has access to related record.
3838

3939
#### Use the RetrieveAccessOrigin message
4040

41-
Developers can use the `RetrieveAccessOrigin` message to detect which users have access to a record. This message returns a sentence describing why the user has the access. Any of following results indicate that the access was granted due to the sharing of a related record:
41+
Developers can use the `RetrieveAccessOrigin` message to detect which users have access to a record. This message returns a sentence describing why the user has the access. Any of the following results indicate that the access was granted due to the sharing of a related record:
4242

43-
```console
43+
```output
4444
PrincipalId is owner of a parent entity of object (<record ID>)
4545
PrincipalId is member of team (<team ID>) who is owner of a parent entity of object (<record ID>)
4646
PrincipalId is member of organization (<organization ID>) who is owner of a parent entity of object (<record ID>)
@@ -51,15 +51,15 @@ For more information, see [Determine why a user has access with code](/power-app
5151

5252
## Cause
5353

54-
When the cascading behavior for a table relationship changes, Dataverse starts an asynchronous job to remove the access users were previously granted. However, this job may fail, which could result in users retaining access.
54+
When the cascading behavior for a table relationship changes, Dataverse starts an asynchronous job to remove the access users were previously granted. However, this job may fail, resulting in users retaining access.
5555

5656
## Resolution
5757

58-
The first step to resolve this issue is to recreate the system job to remove access. If the job fails, a developer can use the `ResetInheritedAccess` message to apply the change for a specified set of records.
58+
The first step to resolve this issue is to recreate the system job to remove access. If the job fails, a developer can use the `ResetInheritedAccess` message to apply the change to a specified set of records.
5959

6060
### Recreate the system job to remove access
6161

62-
Developers can use the `CreateAsyncJobToRevokeInheritedAccess` message to try creating the asynchronous job again.
62+
Developers can use the `CreateAsyncJobToRevokeInheritedAccess` message to try creating an asynchronous job again.
6363

6464
#### [SDK for .NET](#tab/sdk)
6565

@@ -113,11 +113,11 @@ OData-Version: 4.0
113113

114114
---
115115

116-
The `CreateAsyncJobToRevokeInheritedAccess` action creates a new asynchronous job named "RevokeInheritedAccess". You can monitor the success of this job. For more information, see [monitoring system jobs](/power-platform/admin/manage-dataverse-auditing#monitoring-system-jobs) or [managing system jobs with code](/power-apps/developer/data-platform/asynchronous-service#managing-system-jobs).
116+
The `CreateAsyncJobToRevokeInheritedAccess` action creates a new asynchronous job named `RevokeInheritedAccess`. You can monitor the success of this job. For more information, see [monitoring system jobs](/power-platform/admin/manage-dataverse-auditing#monitoring-system-jobs) or [managing system jobs with code](/power-apps/developer/data-platform/asynchronous-service#managing-system-jobs).
117117

118118
### Reset inherited access
119119

120-
If [Recreating the system job to remove access](#recreate-the-system-job-to-remove-access) fails, a developer with system administrator or system customizer privileges can use the `ResetInheritedAccess` message to target a subset of matching records. You may need to use this message several times to remove access for all the records.
120+
If [recreating the system job to remove access](#recreate-the-system-job-to-remove-access) fails, a developer with system administrator or system customizer privileges can use the `ResetInheritedAccess` message to target a subset of matching records. You may need to use this message several times to remove access to all the records.
121121

122122
# [SDK for .NET](#tab/sdk)
123123

@@ -177,49 +177,49 @@ OData-Version: 4.0
177177

178178
The `ResetInheritedAccess` message tries to execute synchronously when there aren't many matching records. Then the `ResetInheritedAccessResponse` value ends with `ExecutionMode : Sync`. If there are many matching records, the operation takes longer, and the value ends with `ExecutionMode : Async`. A system job named `Denormalization_PrincipalObjectAccess_principalobjectaccess:<caller ID>` is created, and you can monitor the success of that job. For more information, see [monitoring system jobs](/power-platform/admin/manage-dataverse-auditing#monitoring-system-jobs) or [managing system jobs with code](/power-apps/developer/data-platform/asynchronous-service#managing-system-jobs).
179179

180-
The `ResetInheritedAccess` message requires a Fetch query to identify the records. This query must meet the following requirements:
180+
The `ResetInheritedAccess` message requires a `Fetch` query to identify the records. This query must meet the following requirements:
181181

182182
- Use the `principalobjectaccess`(POA) table.
183183
- Return only the `principalobjectaccessid` column.
184184
- Must not include any `link-entity` elements. You can't add a join to another table.
185185
- Only filter on columns of the `principalobjectaccess` table.
186186

187-
This table is available to the Web API as the [principalobjectaccess entity type](xref:Microsoft.Dynamics.CRM.principalobjectaccess). It isn't included in the [Dataverse table/entity reference](/power-apps/developer/data-platform/reference/about-entity-reference) because the POA table doesn't support any kind of direct data modification operation. You need to know about the columns of this table to compose the FetchXml query.
187+
This table is available to the Web API as the [principalobjectaccess entity type](xref:Microsoft.Dynamics.CRM.principalobjectaccess). It isn't included in the [Dataverse table/entity reference](/power-apps/developer/data-platform/reference/about-entity-reference) because the POA table doesn't support any kind of direct data modification operation. You need to know the columns of this table to compose the FetchXml query.
188188

189189
#### POA table columns
190190

191191
You need to compose a FetchXml query using only these columns.
192192

193-
|LogicalName |Type|Description|
193+
|Logical name |Type|Description|
194194
|---------|---------|---------|
195195
|`accessrightsmask`|Integer|Contains the combined [AccessRights enum](xref:Microsoft.Dynamics.CRM.AccessRights) member values for the access rights that the principal has directly. |
196196
|`changedon`|DateTime|The last date that the principal's access to the record changed.|
197197
|`inheritedaccessrightsmask`|Integer|Contains the combined [AccessRights enum](xref:Microsoft.Dynamics.CRM.AccessRights) member values for the access rights that are applied due to inheritance.|
198198
|`objectid`|Unique Identifier|The ID of the record that the principal has access to.|
199-
|`objecttypecode`|Integer|The [EntityMetadata.ObjectTypeCode](xref:Microsoft.Xrm.Sdk.Metadata.EntityMetadata.ObjectTypeCode) value that corresponds to the table. This value isn't necessarily the same for different environments. For custom tables, it's assigned based on the order the table was created. To get this value, you may need to view the metadata for the table. There are several community tools to find this. There's a solution from Microsoft: [Browse table definitions in your environment](/power-apps/developer/data-platform/browse-your-metadata).|
200-
|`principalid` |Unique Identifier|The ID of the user or team who has access.|
199+
|`objecttypecode`|Integer|The [EntityMetadata.ObjectTypeCode](xref:Microsoft.Xrm.Sdk.Metadata.EntityMetadata.ObjectTypeCode) value that corresponds to the table. This value isn't necessarily the same for different environments. For custom tables, it's assigned based on the order in which the table was created. To get this value, you may need to view the metadata for the table. There are several community tools to find this. Here's a solution from Microsoft: [Browse table definitions in your environment](/power-apps/developer/data-platform/browse-your-metadata).|
200+
|`principalid` |Unique Identifier|The ID of the user or team that has access.|
201201
|`principalobjectaccessid`|Unique Identifier|The primary key of the POA table.|
202202
|`principaltypecode`|Integer|The type code of the principal. `SystemUser` = 8, `Team` = 9.|
203203

204-
The following [AccessRights enum](xref:Microsoft.Dynamics.CRM.AccessRights) member values apply for the `accessrightsmask` and `inheritedaccessrightsmask` columns:
204+
The following [AccessRights enum](xref:Microsoft.Dynamics.CRM.AccessRights) member values apply to the `accessrightsmask` and `inheritedaccessrightsmask` columns:
205205

206206
|Access type|Value|Description|
207207
|---------|---------|---------|
208-
|None|0|No access.|
209-
|Read|1|The right to read a record.|
210-
|Write|2|The right to update a record.|
211-
|Append|4|The right to append the specified record to another record. |
212-
|AppendTo|16|The right to append another record to the specified record. |
213-
|Create|32|The right to create a record.|
214-
|Delete|65,536|The right to delete a record.|
215-
|Share|262,144|The right to share a record.|
216-
|Assign|524,288|The right to assign the specified record to another user or team.|
217-
218-
You may see that the `inheritedaccessrightsmask` value is commonly 135,069,719. This value includes all the access types except for create, which isn't necessary because these rights only apply to records already created.
208+
|`None`|0|No access.|
209+
|`Read`|1|The right to read a record.|
210+
|`Write`|2|The right to update a record.|
211+
|`Append`|4|The right to append the specified record to another record. |
212+
|`Append`To|16|The right to append another record to the specified record. |
213+
|`Create`|32|The right to create a record.|
214+
|`Delete`|65,536|The right to delete a record.|
215+
|`Share`|262,144|The right to share a record.|
216+
|`Assign`|524,288|The right to assign the specified record to another user or team.|
217+
218+
You may see that the `inheritedaccessrightsmask` value is commonly 135,069,719. This value includes all the access types except for `Create`, which isn't necessary because these rights only apply to records already created.
219219

220220
#### FetchXml examples
221221

222-
This section includes some example FetchXml queries you might use with the `ResetInheritedAccess` message. [Learn more about creating FetchXml queries](/power-apps/developer/data-platform/use-fetchxml-construct-query).
222+
This section includes some examples of FetchXml queries you might use with the `ResetInheritedAccess` message. For more information, see [Use FetchXML to construct a query](/power-apps/developer/data-platform/use-fetchxml-construct-query).
223223

224224
##### Reset inherited access given to a certain user for a specific account
225225

0 commit comments

Comments
 (0)