편집

Delete resourceAccountKeyAuthenticationMethod

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.

Delete a resourceAccountKeyAuthenticationMethod object.

Warning

Deleting a resource account key authentication method cannot be undone. After deletion, the shared device will no longer be able to authenticate silently using this credential.

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.ReadWrite.All UserAuthenticationMethod.ReadWrite.All
Delegated (personal Microsoft account) Not supported. Not supported.
Application UserAuthMethod-ResourceKey.ReadWrite.All UserAuthenticationMethod.ReadWrite.All

HTTP request

DELETE /users/{id | userPrincipalName}/authentication/resourceAccountKeyAuthenticationMethods/{resourceAccountKeyAuthenticationMethodId}

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 204 No Content response code. It doesn't return anything in the response body.

If the credential ID doesn't exist, this method returns a 404 Not Found error code with an error code of resourceNotFound.

Examples

Request

The following example shows a request.

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

Response

The following example shows the response.

HTTP/1.1 204 No Content