POST https://graph.microsoft.com/v1.0/applications/{id}/setVerifiedPublisher
Content-type: application/json
{
"verifiedPublisherId": "1234567"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Applications.Item.SetVerifiedPublisher;
var requestBody = new SetVerifiedPublisherPostRequestBody
{
VerifiedPublisherId = "1234567",
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
await graphClient.Applications["{application-id}"].SetVerifiedPublisher.PostAsync(requestBody);
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc applications set-verified-publisher post --application-id {application-id} --body '{\
"verifiedPublisherId": "1234567"\
}\
'
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.applications.item.setverifiedpublisher.SetVerifiedPublisherPostRequestBody setVerifiedPublisherPostRequestBody = new com.microsoft.graph.applications.item.setverifiedpublisher.SetVerifiedPublisherPostRequestBody();
setVerifiedPublisherPostRequestBody.setVerifiedPublisherId("1234567");
graphClient.applications().byApplicationId("{application-id}").setVerifiedPublisher().post(setVerifiedPublisherPostRequestBody);
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\SetVerifiedPublisherPostRequestBody;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new SetVerifiedPublisherPostRequestBody();
$requestBody->setVerifiedPublisherId('1234567');
$graphServiceClient->applications()->byApplicationId('application-id')->setVerifiedPublisher()->post($requestBody)->wait();