You can address the application using either its id or appId. id and appId are referred to as the Object ID and Application (Client) ID, respectively, in app registrations in the Microsoft Entra admin center.
POST /applications/{id}/removePassword
POST /applications(appId='{appId}')/removePassword
Request headers
Name
Description
Authorization
Bearer {token}. Required.
Content-Type
application/json. Required.
Request body
Property
Type
Description
keyId
Guid
The unique identifier for the password. Required.
Response
If successful, this method returns a 204 No content response code.
Examples
The following is example shows how to call this API.
POST https://graph.microsoft.com/v1.0/applications/{id}/removePassword
Content-type: application/json
{
"keyId": "f0b0b335-1d71-4883-8f98-567911bfdca6"
}
// Code snippets are only available for the latest version. Current version is 5.x
var graphClient = new GraphServiceClient(requestAdapter);
var requestBody = new Microsoft.Graph.Applications.Item.RemovePassword.RemovePasswordPostRequestBody
{
KeyId = Guid.Parse("f0b0b335-1d71-4883-8f98-567911bfdca6"),
};
await graphClient.Applications["{application-id}"].RemovePassword.PostAsync(requestBody);
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc applications remove-password post --application-id {application-id} --body '{\
"keyId": "f0b0b335-1d71-4883-8f98-567911bfdca6"\
}\
'
<?php
// THIS SNIPPET IS A PREVIEW VERSION OF THE SDK. NON-PRODUCTION USE ONLY
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new RemovePasswordPostRequestBody();
$requestBody->setKeyId('f0b0b335-1d71-4883-8f98-567911bfdca6');
$graphServiceClient->applications()->byApplicationId('application-id')->removePassword()->post($requestBody)->wait();
# THE PYTHON SDK IS IN PREVIEW. FOR NON-PRODUCTION USE ONLY
graph_client = GraphServiceClient(request_adapter)
request_body = RemovePasswordPostRequestBody(
key_id = UUID("f0b0b335-1d71-4883-8f98-567911bfdca6"),
)
await graph_client.applications.by_application_id('application-id').remove_password.post(body = request_body)