PATCH https://graph.microsoft.com/v1.0/education/schools/{school-id}
Content-type: application/json
{
"displayName": "Fabrikam Arts High School",
"description": "Magnate school for the arts. Los Angeles School District"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new EducationSchool
{
DisplayName = "Fabrikam Arts High School",
Description = "Magnate school for the arts. Los Angeles School District",
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Education.Schools["{educationSchool-id}"].PatchAsync(requestBody);
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc education schools patch --education-school-id {educationSchool-id} --body '{\
"displayName": "Fabrikam Arts High School",\
"description": "Magnate school for the arts. Los Angeles School District"\
}\
'
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
EducationSchool educationSchool = new EducationSchool();
educationSchool.setDisplayName("Fabrikam Arts High School");
educationSchool.setDescription("Magnate school for the arts. Los Angeles School District");
EducationSchool result = graphClient.education().schools().byEducationSchoolId("{educationSchool-id}").patch(educationSchool);
const options = {
authProvider,
};
const client = Client.init(options);
const educationSchool = {
displayName: 'Fabrikam Arts High School',
description: 'Magnate school for the arts. Los Angeles School District'
};
await client.api('/education/schools/{school-id}')
.update(educationSchool);
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\EducationSchool;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new EducationSchool();
$requestBody->setDisplayName('Fabrikam Arts High School');
$requestBody->setDescription('Magnate school for the arts. Los Angeles School District');
$result = $graphServiceClient->education()->schools()->byEducationSchoolId('educationSchool-id')->patch($requestBody)->wait();
Import-Module Microsoft.Graph.Education
$params = @{
displayName = "Fabrikam Arts High School"
description = "Magnate school for the arts. Los Angeles School District"
}
Update-MgEducationSchool -EducationSchoolId $educationSchoolId -BodyParameter $params
from msgraph import GraphServiceClient
from msgraph.generated.models.education_school import EducationSchool
graph_client = GraphServiceClient(credentials, scopes)
request_body = EducationSchool(
display_name = "Fabrikam Arts High School",
description = "Magnate school for the arts. Los Angeles School District",
)
result = await graph_client.education.schools.by_education_school_id('educationSchool-id').patch(request_body)