You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: "Sharing and assigning (Microsoft Dataverse) | Microsoft Docs"# Intent and product brand in a unique string of 43-59 chars including spaces
3
3
description: "Learn about the security that applies to sharing and assigning records."# 115-145 characters including spaces. This abstract displays in the search result.
In this article we will look at the security access when sharing and assigning records.
17
+
In this article, we'll look at security access when sharing and assigning records.
18
18
19
19
## Sharing records
20
20
21
21
Sharing lets users give other users or teams access to specific customer
22
-
information. This is useful for sharing information with users in roles that
22
+
information. Sharing records is useful for sharing information with users in roles that
23
23
have only the **Basic** access level. For example, in an organization that gives
24
24
salespeople **Basic** read and write access to accounts, a salesperson can share an
25
25
opportunity with another salesperson so that they can both track the progress of
@@ -33,26 +33,181 @@ specific access rights, and they might also be on a team in which the same
33
33
record is shared with different access rights. In this case, the access rights
34
34
that this user has on the record are the union of all the rights.
35
35
36
-
When you share a record with another user using the `GrantAccess` message (<xref:Microsoft.Dynamics.CRM.GrantAccess> action, <xref:Microsoft.Crm.Sdk.Messages.GrantAccessRequest> class), or modify access using the `ModifyAccess` message (<xref:Microsoft.Dynamics.CRM.ModifyAccess> action, <xref:Microsoft.Crm.Sdk.Messages.ModifyAccessRequest> class), you must indicate what access rights you want to
37
-
grant to the other user. Access rights on a shared record can be different for
38
-
each user with whom the record is shared. However, you cannot give a user any
39
-
rights that they would not have for that type of table, based on the role
40
-
assigned to that user. For example, if a user does not have **Read** privileges on
41
-
accounts and you share an account with that user, the user will be unable to see
36
+
When you share a record with another user using the `GrantAccess` message, you must indicate what access rights you want to
37
+
grant to the other user. To modify the access of a shared record, use the `ModifyAccess` message. Access rights on a shared record can be different for each user with whom the record is shared. However, you can't give a user any
38
+
rights that they wouldn't have for that type of table, based on the role
39
+
assigned to that user. For example, if a user doesn't have **Read** privileges on
40
+
accounts and you share an account with that user, the user is unable to see
42
41
that account.
43
42
44
-
### Sharing and inheritance
43
+
### GrantAccess example
44
+
45
+
These examples show the use of the `GrantAccess` message to share a record with another principal.
46
+
47
+
#### [SDK for .NET](#tab/sdk)
48
+
49
+
The following `ShareRecord` static method shows how to use the [PrincipalAccess Class](xref:Microsoft.Crm.Sdk.Messages.PrincipalAccess) to specify a reference to a principal (user, team, or organization) with a set of [AccessRights](xref:Microsoft.Crm.Sdk.Messages.AccessRights) that contain the rights that to be granted to the principal.
50
+
51
+
```csharp
52
+
/// <summary>
53
+
/// Shares a record with a principal
54
+
/// </summary>
55
+
/// <paramname="service">Authenticated client implementing the IOrganizationService interface</param>
56
+
/// <paramname="principal">The user, team, or organization to share the record with.</param>
57
+
/// <paramname="access">The access rights to grant</param>
58
+
/// <paramname="record">The record to share</param>
59
+
staticvoidShareRecord(
60
+
IOrganizationServiceservice,
61
+
EntityReferenceprincipal,
62
+
AccessRightsaccess,
63
+
EntityReferencerecord)
64
+
{
65
+
66
+
PrincipalAccessprincipalAccess=new()
67
+
{
68
+
AccessMask=access,
69
+
Principal=principal
70
+
};
71
+
72
+
GrantAccessRequestrequest=new()
73
+
{
74
+
PrincipalAccess=principalAccess,
75
+
Target=record
76
+
};
77
+
78
+
service.Execute(request);
79
+
}
80
+
```
81
+
82
+
#### [Web API](#tab/webapi)
83
+
84
+
The following example shows the use of the [GrantAccess Action](xref:Microsoft.Dynamics.CRM.GrantAccess) using the [PrincipalAccess ComplexType](xref:Microsoft.Dynamics.CRM.PrincipalAccess) to specify the principal (user, team, or organization) and level of access to grant using the values in the [AccessRights EnumType](xref:Microsoft.Dynamics.CRM.AccessRights).
These examples show the use of the `ModifyAccess` message to change the access granted to a principal for a shared record.
124
+
125
+
#### [SDK for .NET](#tab/sdk)
126
+
127
+
The following `ModifyShare` static method shows how to use the [PrincipalAccess Class](xref:Microsoft.Crm.Sdk.Messages.PrincipalAccess) to specify a reference to a principal (user, team, or organization) with a set of [AccessRights](xref:Microsoft.Crm.Sdk.Messages.AccessRights) that contain the rights that will be modified for the principal.
128
+
129
+
```csharp
130
+
/// <summary>
131
+
/// Modifies the access to a shared record.
132
+
/// </summary>
133
+
/// <paramname="service">Authenticated client implementing the IOrganizationService interface</param>
134
+
/// <paramname="principal">The user, team, or organization to modify rights to the shared.</param>
135
+
/// <paramname="access">The access rights to modify</param>
136
+
/// <paramname="record">The shared record</param>
137
+
staticvoidModifyShare(
138
+
IOrganizationServiceservice,
139
+
EntityReferenceprincipal,
140
+
AccessRightsaccess,
141
+
EntityReferencerecord)
142
+
{
143
+
PrincipalAccessprincipalAccess=new()
144
+
{
145
+
AccessMask=access,
146
+
Principal=principal
147
+
};
148
+
149
+
ModifyAccessRequestrequest=new()
150
+
{
151
+
152
+
PrincipalAccess=principalAccess,
153
+
Target=record
154
+
};
155
+
156
+
service.Execute(request);
157
+
}
158
+
```
159
+
160
+
#### [Web API](#tab/webapi)
161
+
162
+
The following example shows the use of the [ModifyAccess Action](xref:Microsoft.Dynamics.CRM.ModifyAccess) using the [PrincipalAccess ComplexType](xref:Microsoft.Dynamics.CRM.PrincipalAccess) to specify the principal (user, team, or organization) and level of access to modify using the values in the [AccessRights EnumType](xref:Microsoft.Dynamics.CRM.AccessRights).
163
+
164
+
**Request**
165
+
166
+
```http
167
+
POST [Organization Uri]/api/data/v9.2/ModifyAccess
If a record is created and the parent record has certain sharing properties, the
47
202
new record inherits those properties. For example, Joe and Mike are working on a
48
203
high priority lead. Joe creates a new lead and two activities, shares the lead
49
204
with Mike, and selects cascade sharing. Mike makes a telephone call and sends an
50
205
email regarding the new lead. Joe sees that Mike has contacted the company two
51
-
times, so Joe does not make another call.
206
+
times, so Joe doesn't make another call.
52
207
53
208
Sharing is maintained on individual records. A record inherits the sharing
54
209
properties from its parent and maintains its own sharing properties. Therefore,
55
-
a record can have two sets of sharing properties — one that it has on its own, and
210
+
a record can have two sets of sharing properties—one that it has on its own, and
56
211
one that it inherits from its parent.
57
212
58
213
Removing the share of a parent record removes the sharing properties of objects
@@ -64,24 +219,91 @@ from the parent record.
64
219
## Assigning records
65
220
66
221
Anyone with **Assign** access rights on a record can assign that record to
67
-
another user. When a record is assigned, the new user or team becomes the owner
68
-
of the record and its related records. The original user or team loses ownership
222
+
another user. To assign a record, change the `ownerid` lookup value to refer to a new principal.
223
+
224
+
> [!NOTE]
225
+
> The SDK has an [AssignRequest class](xref:Microsoft.Crm.Sdk.Messages.AssignRequest) that is deprecated. More information: [Legacy update messages](org-service/entity-operations-update-delete.md#legacy-update-messages)
226
+
227
+
When a record is assigned, the new user, team or organization becomes the owner
228
+
of the record and its related records. The original user, team or organization loses ownership
69
229
of the record, but automatically shares it with the new owner.
70
230
71
231
In Microsoft Dataverse, the system administrator can decide for an organization
72
232
whether records should be shared with previous owners or not after the assign
73
233
operation. If **Share reassigned records with original owner** is selected (see **System Settings** > **General**), then the previous owner
74
234
shares the record with all access rights after the assign operation. Otherwise,
75
-
the previous owner does not share the record and may not have access to the
235
+
the previous owner doesn't share the record and may not have access to the
76
236
record, depending on their privileges. The Organization table's
77
237
[ShareToPreviousOwnerOnAssign](reference/entities/organization.md#sharetopreviousowneronassign-choicesoptions) column controls this setting.
78
238
79
239
> [!NOTE]
80
-
> The [Appointment table](reference/entities/appointment.md) has special logic which is used when an appointment is assigned to another user. If the current owner is still a participant such as the organizer or an attendee, the appointment record is shared with this user when the appointment is reassigned. This behavior occurs even if the **Share reassigned records with original owner** setting is disabled. Because the appointment may be shared with the previous owner, the user assigning the meeting requires both the **Assign** and **Share** access rights on the record.
240
+
> The [Appointment table](reference/entities/appointment.md) has special logic when an appointment is assigned to another user. If the current owner is still a participant, such as the organizer or an attendee, the appointment record is shared with this user when the appointment is reassigned. This behavior occurs even if the **Share reassigned records with original owner** setting is disabled. Because the appointment may be shared with the previous owner, the user assigning the meeting requires both the **Assign** and **Share** access rights on the record.
81
241
82
242
## Revoking access
83
243
84
-
As the owner of a record, you can revoke (remove) user access to your shared record. To do so, use the `RevokeAccess` message (<xref:Microsoft.Dynamics.CRM.RevokeAccess> action, <xref:Microsoft.Crm.Sdk.Messages.RevokeAccessRequest> class).
244
+
The owner of the record can use the `RevokeAccess` message to revoke (remove) user access to the shared record.
245
+
246
+
### [SDK for .NET](#tab/sdk)
247
+
248
+
The following `RevokeShare` static method shows how to remove sharing access for a user to a record using the [RevokeAccessRequest Class](xref:Microsoft.Crm.Sdk.Messages.RevokeAccessRequest).
249
+
250
+
```csharp
251
+
/// <summary>
252
+
/// Revokes access to a shared record.
253
+
/// </summary>
254
+
/// <paramname="service">Authenticated client implementing the IOrganizationService interface</param>
255
+
/// <paramname="principal">The user, team, or organization to revoke rights to the shared record.</param>
256
+
/// <paramname="record">The shared record</param>
257
+
staticvoidRevokeShare(
258
+
IOrganizationServiceservice,
259
+
EntityReferenceprincipal,
260
+
EntityReferencerecord)
261
+
{
262
+
RevokeAccessRequestrequest=new()
263
+
{
264
+
Revokee=principal,
265
+
Target=record
266
+
};
267
+
268
+
service.Execute(request);
269
+
}
270
+
```
271
+
272
+
### [Web API](#tab/webapi)
273
+
274
+
The following example shows how to use the [RevokeAccess Action](xref:Microsoft.Dynamics.CRM.RevokeAccess) to remove sharing access for a user to a record. In this example, a user is the `Revokee`, and an account record is the `Target`.
275
+
276
+
**Request**
277
+
278
+
```http
279
+
POST [Organization Uri]/api/data/v9.2/RevokeAccess
Copy file name to clipboardExpand all lines: powerapps-docs/maker/data-platform/azure-synapse-link-synapse.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: "Create an Azure Synapse Link for Dataverse with your Azure Synapse Workspace | MicrosoftDocs"
3
3
description: "Learn how to export table data to Azure Synapse Analytics in Power Apps"
4
4
ms.custom: ""
5
-
ms.date: 02/23/2023
5
+
ms.date: 06/06/2023
6
6
ms.reviewer: "Mattp123"
7
7
ms.suite: ""
8
8
ms.tgt_pltfrm: ""
@@ -134,7 +134,8 @@ After creating an Azure Synapse Link, two versions of the table data will be syn
134
134
- Snapshot data: Provides a read-only copy of near real-time data that is updated at regular intervals (in this case every hour).
135
135
136
136
> [!NOTE]
137
-
> For empty table data and metadata table, only near real-time data is created.
137
+
> For empty table data and metadata tables, only near real-time data is created.
138
+
> To create read-only snapshot data, ensure that the **Permitted scope for copy operations** setting is configured to **From any storage account**. More information: [Configure the permitted scope for copy operations](/azure/storage/common/security-restrict-copy-operations?tabs=portal#configure-the-permitted-scope-for-copy-operations-preview)
138
139
139
140
1. Select the desired Azure Synapse Link, and then select the **Go to Azure Synapse Analytics workspace** from the top panel.
140
141
1. Expand **Lake Databases** from the left panel, select **dataverse**-*environmentName*-*organizationUniqueName*, and then expand **Tables**.
0 commit comments