PATCH https://graph.microsoft.com/beta/programs/7e59d237-2fb0-4e5d-b7bb-d4f9f9129213
Content-type: application/json
{
"displayName": "testprogram3 new name"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Models;
var requestBody = new Program
{
DisplayName = "testprogram3 new name",
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Programs["{program-id}"].PatchAsync(requestBody);
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc-beta programs patch --program-id {program-id} --body '{\
"displayName": "testprogram3 new name"\
}\
'
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
Program program = new Program();
program.setDisplayName("testprogram3 new name");
Program result = graphClient.programs().byProgramId("{program-id}").patch(program);
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\Program;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new Program();
$requestBody->setDisplayName('testprogram3 new name');
$result = $graphServiceClient->programs()->byProgramId('program-id')->patch($requestBody)->wait();
from msgraph import GraphServiceClient
from msgraph.generated.models.program import Program
graph_client = GraphServiceClient(credentials, scopes)
request_body = Program(
display_name = "testprogram3 new name",
)
result = await graph_client.programs.by_program_id('program-id').patch(request_body)