Поделиться через


SystemUser (user) entity messages and methods

 

Applies To: Dynamics 365 (online), Dynamics 365 (on-premises), Dynamics CRM 2016, Dynamics CRM Online

A system user is a person who has access to sign in to Microsoft Dynamics 365 on-premises or Microsoft Dynamics 365 (online). Managing system users involves many different activities. That includes adding system users, setting security roles, and placing system users into a reporting hierarchy. Access to each of these features is protected by what security privileges that the system user has. These privileges are based on the system user's security role. A system user profile must be created and saved before the system user can be assigned security roles or associated with teams. The schema name for this entity is SystemUser. To view the entity metadata for your organization, install the Metadata Browser solution described in Browse the metadata for your organization. You can also view the metadata for an uncustomized organization in the Excel file called EntityMetadata.xlsx included in the top-level folder of the SDK download.

A Dynamics 365 system user account can be either enabled or disabled. Dynamics 365 allows only enabled system users with a paid license to sign in to the application.

An enabled system user's account can be set to disabled to keep historical information, such as the account of a salesperson that has left the company. Set a system user account to disabled to remove that user from workflow processes, such as during vacations. Disabling a system user adds to the available license count, as disabled system users do not count against paid licenses.

Note

To create an instance of a system user entity in an on-premises instance of Microsoft Dynamics 365, the system user must first exist in Active Directory.

To create an instance of a system user entity in Microsoft Dynamics 365 (online), the user’s Microsoft account must already exist. In addition, there is no programmatic way to send an invitation to a user for Microsoft Dynamics 365 (online). You must send user invitations through the web application.

The following table describes the messages for this entity, which you use with the IOrganizationService.Execute method.

Message

Description

AssociateRequest

Creates a link between a record and one or more records that participate in a relationship. You can also use the IOrganizationService.Associate method. For more information, see Actions on entity records. For a list of default relationships for this entity, see SystemUser entity metadata. You can find this information in the metadata for your organization. See the preceding metadata browser information.

CreateRequest

Creates a system user. You can also call the IOrganizationService.Create method.

DisassociateRequest

Removes a link between a record and one or more records that participate in a relationship. You can also use the IOrganizationService.Disassociate method. For more information, see Actions on entity records. For a list of default relationships for this entity, see SystemUser entity metadata. You can find this information in the metadata for your organization. See the preceding metadata browser information.

InitializeFromRequest

Initializes a new record from an existing record provided that an attribute map is defined for the two entities. For more information, see Customize entity and attribute mappings.

RetrieveDuplicatesRequest

Detects and retrieves duplicate records for the specified record provided that duplicate detection is enabled and there are published duplicate detection rules for the entity. For more information, see Detect duplicate data.

ReassignObjectsSystemUserRequest

Reassigns all entities owned by the specified system user to another system user or team.

RetrieveRequest

Retrieves a system user. You can also call the IOrganizationService.Retrieve method.

RemoveParentRequest

Removes the parent for a record.

RetrieveAllChildUsersSystemUserRequest

Retrieves the collection of system users who report to the specified system user.

RetrieveMultipleRequest

Retrieves a collection of system users. You can also call the IOrganizationService.RetrieveMultiple method.

RetrievePrincipalAttributePrivilegesRequest

Retrieves all the secured attribute privileges a user or team has through direct or indirect (through team membership) associations with the FieldSecurityProfile entity.

RetrieveTeamsSystemUserRequest

Deprecated. Use the RetrieveMultipleRequest class. Retrieves the collection of teams of which the specified system user is a member.

RetrieveUserPrivilegesRequest

Retrieves all the privileges a system user (user) has through his or her roles in the specified business unit.

RetrieveUserSettingsSystemUserRequest

Deprecated. Use the RetrieveMultipleRequest class. Retrieves the system user settings for the specified system user.

SetBusinessSystemUserRequest

Sets the business unit for the specified system user.

SetParentSystemUserRequest

Sets the parent (manager) for the specified system user.

SetStateRequest

Sets the state of a system user. The possible states are defined in the SystemUser.Statecode attribute. If you are using early bound types, use the SystemUserState enumeration. For a list of the state values, see SystemUser entity metadata. You can find this information in the metadata for your organization. See the preceding metadata browser information.

UpdateRequest

Updates a system user. You can also call the IOrganizationService.Update method.

UpdateUserSettingsSystemUserRequest

Deprecated. Use the UpdateRequest class. Updates the system user settings for a system user.

See Also

User and team entities
Privileges by entity
UserSettings entity messages and methods

Microsoft Dynamics 365

© 2016 Microsoft. All rights reserved. Copyright