列出电子邮件List emails

命名空间:microsoft.graphNamespace: microsoft.graph

重要

/betaMicrosoft Graph 中的版本下的 api 可能会发生更改。APIs under the /beta version in Microsoft Graph are subject to change. 不支持在生产应用程序中使用这些 API。Use of these APIs in production applications is not supported. 若要确定 API 在 v1.0 中是否可用,请使用 版本 选择器。To determine whether an API is available in v1.0, use the Version selector.

从用户的配置文件中检索itemEmail对象的列表。Retrieve a list of itemEmail objects from a user's profile.

权限Permissions

要调用此 API,需要以下权限之一。要了解详细信息,包括如何选择权限的信息,请参阅权限One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.

权限类型Permission type 权限(从最低特权到最高特权)Permissions (from least to most privileged)
委派(工作或学校帐户)Delegated (work or school account) User. Read、User.readbasic.all、user. all、All、user. all。 AllUser.Read, User.ReadWrite, User.ReadBasic.All, User.Read.All, User.ReadWrite.All
委派(个人 Microsoft 帐户)Delegated (personal Microsoft account) User. Read、User.readbasic.all、user. all、All、user. all。 AllUser.Read, User.ReadWrite, User.ReadBasic.All, User.Read.All, User.ReadWrite.All
应用程序Application User.readbasic.all、所有用户读写全部。 AllUser.ReadBasic.All, User.Read.All, User.ReadWrite.All

HTTP 请求HTTP request

GET /me/profile/emails
GET /users/{id | userPrincipalName}/profile/emails

可选的查询参数Optional query parameters

此方法支持以下 OData 查询参数来帮助自定义响应。This method supports the following OData query parameters to help customize the response. 若要了解一般信息,请参阅 OData 查询参数For general information, see OData query parameters.

名称Name Value 说明Description
$filter$filter stringstring 将响应限制为仅包含指定条件的那些对象。Limits the response to only those objects which contain the specified criteria.
$orderby$orderby stringstring 默认情况下,响应中的对象按其在查询中的 createdDateTime 值进行排序。By default the objects in the response are sorted by their createdDateTime value in a query. 您可以使用 $orderby 参数更改响应的顺序。You can change the order of the of the response using the $orderby parameter.
$select$select stringstring 要在响应中添加的属性列表(以逗号分隔)。为获得最佳结果,请仅选择所需属性的子集。Comma-separated list of properties to include in the response. For optimal performance, only select the subset of properties needed.
$skip$skip intint 跳过前 n 个结果,对于分页非常有用。Skip the first n results, useful for paging.
$top$top intint 要返回的结果数。Number of results to be returned.

请求标头Request headers

名称Name 说明Description
AuthorizationAuthorization Bearer {token}。必需。Bearer {token}. Required.

请求正文Request body

请勿提供此方法的请求正文。Do not supply a request body for this method.

响应Response

如果成功,此方法 200 OK 在响应正文中返回响应代码和 itemEmail 对象集合。If successful, this method returns a 200 OK response code and a collection of itemEmail objects in the response body.

示例Examples

GET https://graph.microsoft.com/beta/me/profile/emails

响应Response

注意: 为了提高可读性,可能缩短了此处显示的响应对象。Note: The response object shown here might be shortened for readability.

HTTP/1.1 200 OK
Content-Type: application/json

{
  "value": [
    {
      "id": "e13f7a4d-303c-464f-a6af-80ea18eb74f3",
      "allowedAudiences": "organization",
      "inference": null,
      "createdDateTime": "2020-07-06T06:34:12.2294868Z",
      "createdBy": {
        "user": {
            "id": "efee1b77-fb3b-4f65-99d6-274c11914d12",
            "displayName": "Innocenty Popov"
        }
      },
      "lastModifiedDateTime": "2020-07-08T06:34:12.2294868Z",
      "lastModifiedBy": {
        "user": {
            "id": "efee1b77-fb3b-4f65-99d6-274c11914d12",
            "displayName": "Innocenty Popov"
        }
      },
      "source": {
        "type": "User"
      },
      "address": "innocenty.popov@adventureworks.com",
      "displayName": "Innocenty Popov",
      "type": "work"
    }
  ]
}