educationUser 资源类型educationUser resource type

系统中的用户。A user in the system. 这是特定于教育的用户变体,具有 Microsoft Graph 将从非特定于教育的 /users 终结点返回的相同 idThis is an education-specific variant of the user with the same id that Microsoft Graph will return from the non-education-specific /users endpoint. 此对象提供来自核心 user 对象的目标属性子集,并添加一组特定于教育的属性,如 primaryRole、学生和教师数据。This object provides a targeted subset of properties from the core user object and adds a set of education-specific properties such as primaryRole, student, and teacher data.

方法Methods

方法Method 返回类型Return Type 说明Description
Get educationUserGet educationUser educationUsereducationUser 读取 educationUser 对象的属性和关系。Read properties and relationships of an educationUser object.
List classesList classes educationClass 集合educationClass collection 获取 educationClass 对象集合,用户是该集合的成员。Get the educationClass object collection for which the user is member.
List schoolsList schools educationSchool 集合educationSchool collection 获取 educationSchool 对象集合,用户是该集合的成员。Get the educationSchool object collection for which the user is a member.
Get userGet user useruser 获取与此 educationUser 对应的简单目录 userGet the simple directory user that corresponds to this educationUser.
UpdateUpdate educationUsereducationUser 更新 educationUser 对象。Update an educationUser object.
删除Delete None 删除 educationUser 对象。Delete an educationUser object.

属性Properties

属性Property 类型Type 说明Description
accountEnabledaccountEnabled BooleanBoolean 如果帐户已启用,则为 true;否则,为 falseTrue if the account is enabled; otherwise, false. 创建用户时此属性是必需的。This property is required when a user is created. 支持 $filter。Supports $filter.
assignedLicensesassignedLicenses assignedLicense collectionassignedLicense collection 分配给该用户的许可证。不可为 null。The licenses that are assigned to the user. Not nullable.
assignedPlansassignedPlans assignedPlan collectionassignedPlan collection 分配给该用户的计划。只读。不可为 null。The plans that are assigned to the user. Read-only. Not nullable.
businessPhonesbusinessPhones String collectionString collection 用户的电话号码。The telephone numbers for the user. 注意: 虽然这是字符串集合,但是只能为该属性设置一个号码。Note: Although this is a string collection, only one number can be set for this property.
createdBycreatedBy identitySetidentitySet 创建了用户的实体。Entity who created the user.
departmentdepartment StringString 用户工作部门的名称。支持 $filter。The name for the department in which the user works. Supports $filter.
displayNamedisplayName StringString 用户通讯簿中显示的名称。The name displayed in the address book for the user. 这通常是用户名字、中间名首字母和姓氏的组合。This is usually the combination of the user's first name, middle initial, and last name. 此属性在创建用户时是必需的,并且在更新过程中不能清除。This property is required when a user is created and it cannot be cleared during updates. 支持 $filter 和 $orderby。Supports $filter and $orderby.
externalSourceexternalSource educationExternalSource 创建此用户的位置。Where this user was created from. 可能的值为: sismanualThe possible values are: sis, manual.
givenNamegivenName StringString 用户的名。支持 $filter。The given name (first name) of the user. Supports $filter.
idid 字符串String 用户的唯一标识符。继承自 directoryObject。键。不可为 null。只读。The unique identifier for the user. Inherited from directoryObject. Key. Not nullable. Read-only.
mailmail StringString 用户的 SMTP 地址;例如,“jeff@contoso.onmicrosoft.com”。The SMTP address for the user; for example, "jeff@contoso.onmicrosoft.com". 只读。Read-Only. 支持 $filter。Supports $filter.
mailingAddressmailingAddress physicalAddressphysicalAddress 用户的邮件地址。Mail address of user.
mailNicknamemailNickname StringString 用户的邮件别名。创建用户时必须指定此属性。支持 $filter。The mail alias for the user. This property must be specified when a user is created. Supports $filter.
middleNamemiddleName StringString 用户的中间名。The middle name of user.
mobilePhonemobilePhone StringString 用户的主要移动电话号码。The primary cellular telephone number for the user.
passwordPoliciespasswordPolicies 字符串String 指定用户的密码策略。Specifies password policies for the user. 此值是一个枚举,具有一个可能值“DisableStrongPassword”,允许指定比默认策略弱的密码。This value is an enumeration with one possible value being “DisableStrongPassword”, which allows weaker passwords than the default policy to be specified. 另外,还可以指定“DisablePasswordExpiration”。“DisablePasswordExpiration” can also be specified. 可以同时指定两个值;例如:“DisablePasswordExpiration、DisableStrongPassword”。The two can be specified together; for example: "DisablePasswordExpiration, DisableStrongPassword".
passwordProfilepasswordProfile PasswordProfilePasswordProfile 指定用户的密码配置文件。配置文件包含用户的密码。创建用户时此属性是必需的。配置文件中的密码必须满足 passwordPolicies 属性指定的最低要求。默认情况下,必须使用强密码。Specifies the password profile for the user. The profile contains the user’s password. This property is required when a user is created. The password in the profile must satisfy minimum requirements as specified by the passwordPolicies property. By default, a strong password is required.
preferredLanguagepreferredLanguage StringString 用户的首选语言。The preferred language for the user. 应遵循 ISO 639-1 代码;例如“en-US”。Should follow ISO 639-1 Code; for example, "en-US".
primaryRoleprimaryRole educationUserRoleeducationUserRole 用户的默认角色。Default role for a user. 用户的角色在各课程中可能有所不同。The user's role might be different in an individual class. 可能的值为: studentteacherThe possible values are: student, teacher. 支持 $filter。Supports $filter.
provisionedPlansprovisionedPlans ProvisionedPlan collectionProvisionedPlan collection 为用户设置的计划。只读。不可为 null。The plans that are provisioned for the user. Read-only. Not nullable.
relatedContactsrelatedContacts relatedContact集合relatedContact collection 与用户相关的一组联系人。Set of contacts related to the user. 必须在 $select 子句中指定此可选属性, 并且只能为单个用户检索该属性。This optional property must be specified in a $select clause and can only be retrieved for an individual user.
residenceAddressresidenceAddress physicalAddressphysicalAddress 用户所在的地址。Address where user lives.
studentstudent educationStudenteducationStudent 如果主要角色为学生,此部分将包含特定于学生的数据。If the primary role is student, this block will contain student specific data.
surnamesurname StringString 用户的姓氏。支持 $filter。The user's surname (family name or last name). Supports $filter.
teacherteacher educationTeachereducationTeacher 如果主要角色为教师,此部分将包含特定于教师的数据。If the primary role is teacher, this block will conatin teacher specific data.
usageLocationusageLocation StringString 两个字母组成的国家/地区代码(ISO 标准 3166)。A two-letter country code (ISO standard 3166). 鉴于检查服务在国家/地区的可用性的法律要求,这对将分配许可证的用户而言是必需的。Required for users who will be assigned licenses due to a legal requirement to check for availability of services in countries or regions. 示例包括:“US”、“JP”和“GB”。Examples include: "US", "JP", and "GB". 不可为 null。Not nullable. 支持 $filter。Supports $filter.
userPrincipalNameuserPrincipalName 字符串String 用户的用户主体名称 (UPN)。UPN 是用户基于 Internet 标准 RFC 822 的 Internet 式登录名。按照惯例,此名称应映射到用户的电子邮件名称。常规格式是 alias@domain,其中,domain 必须位于租户的已验证域集合中。创建用户时此属性是必需的。可从 组织verifiedDomains 属性访问租户的已验证域。支持 $filter 和 $orderby。The user principal name (UPN) of the user. The UPN is an Internet-style login name for the user based on the Internet standard RFC 822. By convention, this should map to the user's email name. The general format is alias@domain, where domain must be present in the tenant’s collection of verified domains. This property is required when a user is created. The verified domains for the tenant can be accessed from the verifiedDomains property of organization. Supports $filter and $orderby.
userTypeuserType StringString 可用于对目录中的用户类型分类的字符串值,例如“成员”和“访客”。支持 $filter。A string value that can be used to classify user types in your directory, such as “Member” and “Guest”. Supports $filter.

关系Relationships

关系Relationship 类型Type 说明Description
classesclasses educationClass 集合educationClass collection 用户所属的课程。Classes to which the user belongs. 可为 Null。Nullable.
schoolsschools educationSchool 集合educationSchool collection 用户所属的学校。Schools to which the user belongs. 可为 NULL。Nullable.
assignmentsassignments educationAssignmenteducationAssignment 用户的工作分配列表。List of assignments for the user. 可为 Null。Nullable.
useruser useruser 与此用户对应的目录用户。The directory user corresponding to this user.

注意:****educationassignment 资源是 /beta 版本资源。Note: The educationassignment resource is a /beta version resource. 如果使用此资源,请务必定期查看更改日志If using this resource, be sure to review the change log periodically. 当 Microsoft Graph API 资源发布到 /v1.0 终结点时,更改日志中会记录此版本。When Microsoft Graph API resources are released to the /v1.0 endpoint, the release is noted in the change log. 如果应用程序使用 educationassignment 资源,需要声明基本请求 URL,如下面的代码块所示:If your app consumes the educationassignment resource, you will need to declare base request URLs as shown in the following code block:

var v1BaseUrl = “https://graph.microsoft.com/v1.0/education”;
var betaBaseUrl = “https://graph.microsoft.com/beta/education”;  // for administrativeUnit and educationOrganization

JSON 表示形式JSON representation

下面是资源的 JSON 表示形式。The following is a JSON representation of the resource.

{
  "id": "string",
  "accountEnabled": true,
  "assignedLicenses": [{"@odata.type": "microsoft.graph.assignedLicense"}],
  "assignedPlans": [{"@odata.type": "microsoft.graph.assignedPlan"}],
  "businessPhones": ["555-555-6568"],
  "department": "string",
  "displayName": "string",
  "givenName": "string",
  "middleName": "string",
  "surname": "string",
  "mail": "string",
  "mailNickname": "string",
  "mobilePhone": "string",
  "createdBy": {"@odata.type": "microsoft.graph.identitySet"},
  "externalSource": "string",
  "mailingAddress": {"@odata.type": "microsoft.graph.physicalAddress"},
  "passwordPolicies": "string",
  "passwordProfile": {"@odata.type": "microsoft.graph.passwordProfile"},
  "preferredLanguage": "string",
  "primaryRole": "string",
  "provisionedPlans": [{"@odata.type": "microsoft.graph.provisionedPlan"}],
  "residenceAddress": {"@odata.type": "microsoft.graph.physicalAddress"},
  "student": {"@odata.type": "microsoft.graph.educationStudent"},
  "teacher": {"@odata.type": "microsoft.graph.educationTeacher"},
  "usageLocation": "string",
  "userPrincipalName": "string",
  "userType": "string"
}