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
// Dependencies
using Microsoft.Graph.Applications.Item.RemovePassword;
var requestBody = new RemovePasswordPostRequestBody
{
KeyId = Guid.Parse("f0b0b335-1d71-4883-8f98-567911bfdca6"),
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
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"\
}\
'
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.applications.item.removepassword.RemovePasswordPostRequestBody removePasswordPostRequestBody = new com.microsoft.graph.applications.item.removepassword.RemovePasswordPostRequestBody();
removePasswordPostRequestBody.setKeyId(UUID.fromString("f0b0b335-1d71-4883-8f98-567911bfdca6"));
graphClient.applications().byApplicationId("{application-id}").removePassword().post(removePasswordPostRequestBody);
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\RemovePasswordPostRequestBody;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new RemovePasswordPostRequestBody();
$requestBody->setKeyId('f0b0b335-1d71-4883-8f98-567911bfdca6');
$graphServiceClient->applications()->byApplicationId('application-id')->removePassword()->post($requestBody)->wait();