POST https://graph.microsoft.com/v1.0/applications/{id}/removeKey
Content-Type: application/json
{
"keyId": "f0b0b335-1d71-4883-8f98-567911bfdca6",
"proof":"eyJ0eXAiOiJ..."
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Applications.Item.RemoveKey;
var requestBody = new RemoveKeyPostRequestBody
{
KeyId = Guid.Parse("f0b0b335-1d71-4883-8f98-567911bfdca6"),
Proof = "eyJ0eXAiOiJ...",
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
await graphClient.Applications["{application-id}"].RemoveKey.PostAsync(requestBody);
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc applications remove-key post --application-id {application-id} --body '{\
"keyId": "f0b0b335-1d71-4883-8f98-567911bfdca6",\
"proof":"eyJ0eXAiOiJ..."\
}\
'
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.applications.item.removekey.RemoveKeyPostRequestBody removeKeyPostRequestBody = new com.microsoft.graph.applications.item.removekey.RemoveKeyPostRequestBody();
removeKeyPostRequestBody.setKeyId(UUID.fromString("f0b0b335-1d71-4883-8f98-567911bfdca6"));
removeKeyPostRequestBody.setProof("eyJ0eXAiOiJ...");
graphClient.applications().byApplicationId("{application-id}").removeKey().post(removeKeyPostRequestBody);
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\RemoveKeyPostRequestBody;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new RemoveKeyPostRequestBody();
$requestBody->setKeyId('f0b0b335-1d71-4883-8f98-567911bfdca6');
$requestBody->setProof('eyJ0eXAiOiJ...');
$graphServiceClient->applications()->byApplicationId('application-id')->removeKey()->post($requestBody)->wait();