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
Copy file name to clipboardExpand all lines: api-reference/beta/api/group-post-members.md
+19-15Lines changed: 19 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -33,20 +33,21 @@ The following table shows the least privileged permission that's required by eac
33
33
|[servicePrincipal](../resources/group.md)| GroupMember.ReadWrite.All and Application.ReadWrite.All | Not supported. | GroupMember.ReadWrite.All and Application.ReadWrite.All |
34
34
|[user](../resources/user.md)| GroupMember.ReadWrite.All | Not supported. | GroupMember.ReadWrite.All |
35
35
36
-
In delegated scenarios, the signed-in user must also be assigned a supported [Microsoft Entra role](/entra/identity/role-based-access-control/permissions-reference?toc=%2Fgraph%2Ftoc.json) or a custom role with the `microsoft.directory/groups/members/update` role permission. The following roles are the least privileged roles that are supported for this operation, except for role-assignable groups:
37
-
38
-
- Group owners
39
-
- Directory Writers
40
-
- Groups Administrator
41
-
- Identity Governance Administrator
42
-
- User Administrator
43
-
- Exchange Administrator - only for Microsoft 365 groups
44
-
- SharePoint Administrator - only for Microsoft 365 groups
45
-
- Teams Administrator - only for Microsoft 365 groups
46
-
- Yammer Administrator - only for Microsoft 365 groups
47
-
- Intune Administrator - only for security groups
48
-
49
-
To add members to a role-assignable group, the app must also be assigned the *RoleManagement.ReadWrite.Directory* permission and the calling user must be assigned a supported Microsoft Entra role. *Privileged Role Administrator* is the least privileged role that is supported for this operation.
36
+
> [!IMPORTANT]
37
+
> In delegated scenarios, the signed-in user must also be assigned a supported [Microsoft Entra role](/entra/identity/role-based-access-control/permissions-reference?toc=%2Fgraph%2Ftoc.json) or a custom role with the `microsoft.directory/groups/members/update` role permission. The following roles are the least privileged roles that are supported for this operation, except for role-assignable groups:
38
+
>
39
+
> - Group owners
40
+
> - Directory Writers
41
+
> - Groups Administrator
42
+
> - Identity Governance Administrator
43
+
> - User Administrator
44
+
> - Exchange Administrator - only for Microsoft 365 groups
45
+
> - SharePoint Administrator - only for Microsoft 365 groups
46
+
> - Teams Administrator - only for Microsoft 365 groups
47
+
> - Yammer Administrator - only for Microsoft 365 groups
48
+
> - Intune Administrator - only for security groups
49
+
>
50
+
> To add members to a role-assignable group, the app must also be assigned the *RoleManagement.ReadWrite.Directory* permission and the calling user must be assigned a supported Microsoft Entra role. *Privileged Role Administrator* is the least privileged role that is supported for this operation.
50
51
51
52
## HTTP request
52
53
@@ -74,7 +75,10 @@ If using the **directoryObjects** reference, that is, `https://graph.microsoft.c
74
75
75
76
## Response
76
77
77
-
If successful, this method returns a `204 No Content` response code. It returns a `400 Bad Request` response code when the object is already a member of the group or is unsupported as a group member. It returns a `404 Not Found` response code when the object being added doesn't exist.
78
+
If successful, this method returns a `204 No Content` response code. It returns a `400 Bad Request` response code when the object is already a member of the group or is unsupported as a group member. It returns a `404 Not Found` response code when the object being added doesn't exist. It returns `403 Unauthorized` in one of the following scenarios:
79
+
- You're attempting to add a member to a [group that can't be managed through Microsoft Graph](../resources/groups-overview.md#group-types-in-microsoft-entra-id-and-microsoft-graph). This API supports only security and Microsoft 365 groups.
80
+
- You're attempting to add a member you don't have permissions to add. Refer to the preceding [Permissions](#permissions) section for the permissions required to add different member types.
81
+
- You're attempting to add a member to a role-assignable group and you don't have the required permissions.
Copy file name to clipboardExpand all lines: api-reference/v1.0/api/group-post-members.md
+19-15Lines changed: 19 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -31,20 +31,21 @@ The following table shows the least privileged permission that's required by eac
31
31
|[servicePrincipal](../resources/group.md)| GroupMember.ReadWrite.All and Application.ReadWrite.All | Not supported. | GroupMember.ReadWrite.All and Application.ReadWrite.All |
32
32
|[user](../resources/user.md)| GroupMember.ReadWrite.All | Not supported. | GroupMember.ReadWrite.All |
33
33
34
-
In delegated scenarios, the signed-in user must also be assigned a supported [Microsoft Entra role](/entra/identity/role-based-access-control/permissions-reference?toc=%2Fgraph%2Ftoc.json) or a custom role with the `microsoft.directory/groups/members/update` role permission. The following least privileged roles are supported for this operation, except for role-assignable groups:
35
-
36
-
- Group owners
37
-
- Directory Writers
38
-
- Groups Administrator
39
-
- Identity Governance Administrator
40
-
- User Administrator
41
-
- Exchange Administrator - only for Microsoft 365 groups
42
-
- SharePoint Administrator - only for Microsoft 365 groups
43
-
- Teams Administrator - only for Microsoft 365 groups
44
-
- Yammer Administrator - only for Microsoft 365 groups
45
-
- Intune Administrator - only for security groups
46
-
47
-
To add members to a role-assignable group, the app must also be assigned the *RoleManagement.ReadWrite.Directory* permission and the calling user must be assigned a supported Microsoft Entra role. *Privileged Role Administrator* is the least privileged role that is supported for this operation.
34
+
> [!IMPORTANT]
35
+
> In delegated scenarios, the signed-in user must also be assigned a supported [Microsoft Entra role](/entra/identity/role-based-access-control/permissions-reference?toc=%2Fgraph%2Ftoc.json) or a custom role with the `microsoft.directory/groups/members/update` role permission. The following roles are the least privileged roles that are supported for this operation, except for role-assignable groups:
36
+
>
37
+
> - Group owners
38
+
> - Directory Writers
39
+
> - Groups Administrator
40
+
> - Identity Governance Administrator
41
+
> - User Administrator
42
+
> - Exchange Administrator - only for Microsoft 365 groups
43
+
> - SharePoint Administrator - only for Microsoft 365 groups
44
+
> - Teams Administrator - only for Microsoft 365 groups
45
+
> - Yammer Administrator - only for Microsoft 365 groups
46
+
> - Intune Administrator - only for security groups
47
+
>
48
+
> To add members to a role-assignable group, the app must also be assigned the *RoleManagement.ReadWrite.Directory* permission and the calling user must be assigned a supported Microsoft Entra role. *Privileged Role Administrator* is the least privileged role that is supported for this operation.
48
49
49
50
## HTTP request
50
51
@@ -72,7 +73,10 @@ If using the **directoryObjects** reference, that is, `https://graph.microsoft.c
72
73
73
74
## Response
74
75
75
-
If successful, this method returns a `204 No Content` response code. It returns a `400 Bad Request` response code when the object is already a member of the group or is unsupported as a group member. It returns a `404 Not Found` response code when the object being added doesn't exist.
76
+
If successful, this method returns a `204 No Content` response code. It returns a `400 Bad Request` response code when the object is already a member of the group or is unsupported as a group member. It returns a `404 Not Found` response code when the object being added doesn't exist. It returns `403 Unauthorized` in one of the following scenarios:
77
+
- You're attempting to add a member to a [group that can't be managed through Microsoft Graph](../resources/groups-overview.md#group-types-in-microsoft-entra-id-and-microsoft-graph). This API supports only security and Microsoft 365 groups.
78
+
- You're attempting to add a member you don't have permissions to add. Refer to the preceding [Permissions](#permissions) section for the permissions required to add different member types.
79
+
- You're attempting to add a member to a role-assignable group and you don't have the required permissions.
0 commit comments