Edytuj

List resourceAccountKeyAuthenticationMethods

Namespace: microsoft.graph

Important

APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the Version selector.

Retrieve a list of the resourceAccountKeyAuthenticationMethod objects and their properties for a resource account.

Permissions

Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.

Permission type Least privileged permission Higher privileged permissions
Delegated (work or school account) UserAuthMethod-ResourceKey.Read.All UserAuthenticationMethod.Read.All, UserAuthenticationMethod.ReadWrite.All, UserAuthMethod-ResourceKey.ReadWrite.All
Delegated (personal Microsoft account) Not supported. Not supported.
Application UserAuthMethod-ResourceKey.Read.All UserAuthenticationMethod.Read.All, UserAuthenticationMethod.ReadWrite.All, UserAuthMethod-ResourceKey.ReadWrite.All

HTTP request

GET /users/{id | userPrincipalName}/authentication/resourceAccountKeyAuthenticationMethods

Optional query parameters

This method supports the $select, $top, $skip, and $count OData query parameters to help customize the response.

Request headers

Name Description
Authorization Bearer {token}. Required. Learn more about authentication and authorization.

Request body

Don't supply a request body for this method.

Response

If successful, this method returns a 200 OK response code and a collection of resourceAccountKeyAuthenticationMethod objects in the response body.

If the user has no resource account key credentials, this method returns a 404 Not Found error code with an error code of resourceNotFound.

Examples

Request

The following example shows a request.

GET https://graph.microsoft.com/beta/users/0a3e7ad0-8d1b-4e25-ad43-5b7c7c2b5f6f/authentication/resourceAccountKeyAuthenticationMethods

Response

The following example shows the response.

Note: The response object shown here might be shortened for readability.

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

{
  "@odata.context": "https://graph.microsoft.com/beta/$metadata#users('0a3e7ad0-8d1b-4e25-ad43-5b7c7c2b5f6f')/authentication/resourceAccountKeyAuthenticationMethods",
  "value": [
    {
      "@odata.type": "#microsoft.graph.resourceAccountKeyAuthenticationMethod",
      "id": "aB3dE5fG7hI9jK1lM3nO5pQ7rS9tU1vW3xY5zA7bC9d1",
      "displayName": "Conference Room MTR-W",
      "createdDateTime": "2026-05-28T19:55:40Z",
      "isUsable": true,
      "methodUsabilityReason": "EnabledByPolicy",
      "lastUsedDateTime": "2026-06-15T08:30:00Z"
    },
    {
      "@odata.type": "#microsoft.graph.resourceAccountKeyAuthenticationMethod",
      "id": "cD5eF7gH9iJ1kL3mN5oP7qR9sT1uV3wX5yZ7aB9cD1e1",
      "displayName": "Teams Phone Room MTR-W",
      "createdDateTime": "2026-05-28T19:53:14Z",
      "isUsable": true,
      "methodUsabilityReason": "EnabledByPolicy",
      "lastUsedDateTime": "2026-06-14T14:22:10Z"
    }
  ]
}