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
|`RetrieveUserPrivilegeByPrivilegeId`<br/>Retrieves the list of privileges for a system user (user) from all direct roles associated with the system user and from all indirect roles associated with teams in which the system user is a member of based on the specified privilege ID.|[RetrieveUserPrivilegeByPrivilegeId Function](xref:Microsoft.Dynamics.CRM.RetrieveUserPrivilegeByPrivilegeId)<br/>[RetrieveUserPrivilegeByPrivilegeIdRequest Class](xref:Microsoft.Crm.Sdk.Messages.RetrieveUserPrivilegeByPrivilegeIdRequest)|
276
+
|`RetrieveUserPrivilegeByPrivilegeName`<br/>Retrieves the list of privileges for a system user (user) from all direct roles associated with the system user and from all indirect roles associated with teams in which the system user is a member of based on the specified privilege name.|[RetrieveUserPrivilegeByPrivilegeName Function](xref:Microsoft.Dynamics.CRM.RetrieveUserPrivilegeByPrivilegeName)<br/>[RetrieveUserPrivilegeByPrivilegeNameRequest Class](xref:Microsoft.Crm.Sdk.Messages.RetrieveUserPrivilegeByPrivilegeNameRequest)|
277
+
|`RetrieveUserSetOfPrivilegesByIds`<br/>Retrieves the filtered privileges a system user (user) has through their roles in the specified business unit.|[RetrieveUserSetOfPrivilegesByIds Function](xref:Microsoft.Dynamics.CRM.RetrieveUserSetOfPrivilegesByIds)<br/>[RetrieveUserSetOfPrivilegesByIdsRequest Class](xref:Microsoft.Crm.Sdk.Messages.RetrieveUserSetOfPrivilegesByIdsRequest)|
278
+
|`RetrieveUserSetOfPrivilegesByNames`<br/>Retrieves the filtered privileges a system user (user) has through his or her roles in the specified business unit.|[RetrieveUserSetOfPrivilegesByNames Function](xref:Microsoft.Dynamics.CRM.RetrieveUserSetOfPrivilegesByNames)<br/>[RetrieveUserSetOfPrivilegesByNamesRequest Class](xref:Microsoft.Crm.Sdk.Messages.RetrieveUserSetOfPrivilegesByNamesRequest)|
279
279
280
280
### Example: Check whether a user has a privilege
281
281
282
282
The following examples show the use of the `RetrieveUserPrivilegeByPrivilegeName` message. This message retrieves the list of privileges for a system user (user) from all direct roles associated with the system user and from all indirect roles associated with teams in which the system user is a member of based on the specified privilege name.
283
283
284
284
#### [.NET SDK](#tab/sdk)
285
285
286
-
The following `HasPrivilege` static method returns the [RolePrivilege](xref:Microsoft.Crm.Sdk.Messages.RolePrivilege) data for a given privilege name.
286
+
The following `HasPrivilege` static method returns whether the user has the named privilege.
0 commit comments