Skip to content

Commit dce242f

Browse files
authored
Merge pull request #4384 from MicrosoftDocs/pehecke-aad-security
AAD security: tech review feedback incorp
2 parents a31a19e + ea6eb1e commit dce242f

File tree

1 file changed

+24
-16
lines changed

1 file changed

+24
-16
lines changed

powerapps-docs/developer/data-platform/webapi/aad-group-team.md

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Work with Azure Active Directory group teams (Dataverse)| Microsoft Docs"
33
description: "Learn about working with an Azure Active Directory group team using the Web API."
44
ms.custom: ""
5-
ms.date: 03/30/2021
5+
ms.date: 04/12/2021
66
ms.service: powerapps
77
ms.suite: ""
88
ms.tgt_pltfrm: ""
@@ -30,12 +30,12 @@ The following sections describe how to work with AAD group teams using the Web A
3030

3131
## Create an AAD group team
3232

33-
Citizen developers wanting to programatically create a Microsoft Dataverse AAD group team can do so by providing the object ID of an existing AAD group as shown in the following command.
33+
Citizen developers wanting to programmatically create a Microsoft Dataverse AAD group team can do so by providing the object ID of an existing AAD group as shown in the following command.
3434

3535
**Request**
3636

3737
```http
38-
POST [Organization URI]/api/data/v9.1/teams
38+
POST [Organization URI]/api/data/v9.0/teams
3939
Accept: application/json
4040
4141
{
@@ -57,11 +57,11 @@ An administrator can assign a security role to an AAD group team after the AAD g
5757
**Request**
5858

5959
```http
60-
POST [Organization URI]/api/data/v9.1/teams(azureactivedirectoryobjectid=<group team ID>,membershiptype=0)/teamroles_association/$ref
60+
POST [Organization URI]/api/data/v9.0/teams(azureactivedirectoryobjectid=<group team ID>,membershiptype=0)/teamroles_association/$ref
6161
Accept: application/json
6262
6363
{
64-
"@odata.id":"[Organization URI]/api/data/v9.1/roles(<role ID>)"
64+
"@odata.id":"[Organization URI]/api/data/v9.0/roles(<role ID>)"
6565
}
6666
```
6767

@@ -72,33 +72,41 @@ An administrator can assign a security role to an AAD group user. The user is a
7272
**Request**
7373

7474
```http
75-
POST [Organization URI]/api/data/v9.1/teams(azureactivedirectoryobjectid=<user object ID>,membershiptype=0)/teamroles_association/$ref
75+
POST [Organization URI]/api/data/v9.0/systemusers(azureactivedirectoryobjectid=<user object ID>)/systemuserroles_association/$ref
7676
Accept: application/json
7777
7878
{
79-
"@odata.id":"[Organization URI]/api/data/v9.1/roles(<role ID>)"
79+
"@odata.id":"[Organization URI]/api/data/v9.0/roles(<role ID>)"
8080
}
8181
```
8282

83-
## Assign and share a record to an AAD group member
83+
## Assign a record to an AAD group member
8484

8585
An administrator can assign a record to an AAD group member. The AAD group member is added into Dataverse automatically if the user doesn’t exist in Dataverse.
8686

8787
The example below shows the syntax for assigning an account record.
8888

89+
**Request**
90+
8991
```http
90-
PATCH [Organization URI]/api/data/v9.1/accounts(<account ID>)
92+
PATCH [Organization URI]/api/data/v9.0/accounts(<account ID>)
9193
Accept: application/json
9294
9395
{
94-
"[email protected]": "[Organization URI]/api/data/v9.2/systemusers(azureactivedirectoryobjectid=<user object ID>)"
96+
"[email protected]": "[Organization URI]/api/data/v9.0/systemusers(azureactivedirectoryobjectid=<user object ID>)"
9597
}
9698
```
9799

100+
## Share a record to an AAD group member
101+
102+
“An administrator or a record owner can share a record to an AAD group member. The AAD group member is added into Dataverse automatically if the user doesn’t exist in Dataverse.
103+
98104
The example below shows the syntax for sharing an account record.
99105

106+
**Request**
107+
100108
```http
101-
POST [Organization URI]/api/data/v9.1/GrantAccess
109+
POST [Organization URI]/api/data/v9.0/GrantAccess
102110
Accept: application/json
103111
104112
{
@@ -108,7 +116,7 @@ Accept: application/json
108116
},
109117
"PrincipalAccess":{
110118
"Principal":{
111-
"@odata.id":"[Organization URI]/api/data/v9.1/systemusers(azureactivedirectoryobjectid=<user object ID>)"
119+
"@odata.id":"[Organization URI]/api/data/v9.0/systemusers(azureactivedirectoryobjectid=<user object ID>)"
112120
},
113121
"AccessMask":"ReadAccess"
114122
}
@@ -122,14 +130,14 @@ Members of an AAD group can query all the security roles that are directly and i
122130
**Request**
123131

124132
```http
125-
GET [Organization URI]/api/data/v9.1/RetrieveAadUserRoles(DirectoryObjectId=<user object ID)?$select=_parentrootroleid_value,name
133+
GET [Organization URI]/api/data/v9.0/RetrieveAadUserRoles(DirectoryObjectId=<user object ID)?$select=_parentrootroleid_value,name
126134
```
127135

128136
**Response**
129137

130138
```json
131139
{
132-
"@odata.context": "https://contoso.crm2.dynamics.com/api/data/v9.1/$metadata#roles",
140+
"@odata.context": "https://contoso.crm2.dynamics.com/api/data/v9.0/$metadata#roles",
133141
"value": [
134142
{
135143
"@odata.etag": "W/\"1649865\"",
@@ -150,14 +158,14 @@ Members of an AAD group can check their security privileges without being a user
150158
**Request**
151159

152160
```http
153-
GET [Organization URI]/api/data/v9.1/RetrieveAadUserPrivileges(DirectoryObjectId=<user object ID>)
161+
GET [Organization URI]/api/data/v9.0/RetrieveAadUserPrivileges(DirectoryObjectId=<user object ID>)
154162
```
155163

156164
**Response**
157165

158166
```json
159167
{
160-
"@odata.context": "https://contoso.crm2.dynamics.com/api/data/v9.1/$metadata#Microsoft.Dynamics.CRM.RetrieveAadUserPrivilegesResponse",
168+
"@odata.context": "https://contoso.crm2.dynamics.com/api/data/v9.0/$metadata#Microsoft.Dynamics.CRM.RetrieveAadUserPrivilegesResponse",
161169
"RolePrivileges": [
162170
{
163171
"Depth": "Global",

0 commit comments

Comments
 (0)