// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Models;
var requestBody = new EducationalActivity
{
Institution = new InstitutionData
{
Location = new PhysicalAddress
{
Type = PhysicalAddressType.Business,
PostOfficeBox = null,
Street = "12000 E Prospect Rd",
City = "Fort Collins",
State = "Colorado",
CountryOrRegion = "USA",
PostalCode = "80525",
},
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Me.Profile.EducationalActivities["{educationalActivity-id}"].PatchAsync(requestBody);
重要
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ版で使用可能なすべての型、プロパティ、API がサポートされているわけではありません。 SDK を使用してベータ API にアクセスする方法の詳細については、「ベータ API で Microsoft Graph SDK を使用する」を参照してください。
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc-beta users profile educational-activities patch --user-id {user-id} --educational-activity-id {educationalActivity-id} --body '{\
"institution": {\
"location": {\
"type": "business",\
"postOfficeBox": null,\
"street": "12000 E Prospect Rd",\
"city": "Fort Collins",\
"state": "Colorado",\
"countryOrRegion": "USA",\
"postalCode": "80525"\
}\
}\
}\
'
重要
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ版で使用可能なすべての型、プロパティ、API がサポートされているわけではありません。 SDK を使用してベータ API にアクセスする方法の詳細については、「ベータ API で Microsoft Graph SDK を使用する」を参照してください。
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ版で使用可能なすべての型、プロパティ、API がサポートされているわけではありません。 SDK を使用してベータ API にアクセスする方法の詳細については、「ベータ API で Microsoft Graph SDK を使用する」を参照してください。
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
EducationalActivity educationalActivity = new EducationalActivity();
InstitutionData institution = new InstitutionData();
PhysicalAddress location = new PhysicalAddress();
location.setType(PhysicalAddressType.Business);
location.setPostOfficeBox(null);
location.setStreet("12000 E Prospect Rd");
location.setCity("Fort Collins");
location.setState("Colorado");
location.setCountryOrRegion("USA");
location.setPostalCode("80525");
institution.setLocation(location);
educationalActivity.setInstitution(institution);
EducationalActivity result = graphClient.me().profile().educationalActivities().byEducationalActivityId("{educationalActivity-id}").patch(educationalActivity);
重要
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ版で使用可能なすべての型、プロパティ、API がサポートされているわけではありません。 SDK を使用してベータ API にアクセスする方法の詳細については、「ベータ API で Microsoft Graph SDK を使用する」を参照してください。
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ版で使用可能なすべての型、プロパティ、API がサポートされているわけではありません。 SDK を使用してベータ API にアクセスする方法の詳細については、「ベータ API で Microsoft Graph SDK を使用する」を参照してください。
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\EducationalActivity;
use Microsoft\Graph\Generated\Models\InstitutionData;
use Microsoft\Graph\Generated\Models\PhysicalAddress;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new EducationalActivity();
$institution = new InstitutionData();
$institutionLocation = new PhysicalAddress();
$institutionLocation->setType(new PhysicalAddressType('business'));
$institutionLocation->setPostOfficeBox(null);
$institutionLocation->setStreet('12000 E Prospect Rd');
$institutionLocation->setCity('Fort Collins');
$institutionLocation->setState('Colorado');
$institutionLocation->setCountryOrRegion('USA');
$institutionLocation->setPostalCode('80525');
$institution->setLocation($institutionLocation);
$requestBody->setInstitution($institution);
$result = $graphServiceClient->me()->profile()->educationalActivities()->byEducationalActivityId('educationalActivity-id')->patch($requestBody)->wait();
重要
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ版で使用可能なすべての型、プロパティ、API がサポートされているわけではありません。 SDK を使用してベータ API にアクセスする方法の詳細については、「ベータ API で Microsoft Graph SDK を使用する」を参照してください。
Import-Module Microsoft.Graph.Beta.People
$params = @{
institution = @{
location = @{
type = "business"
postOfficeBox = $null
street = "12000 E Prospect Rd"
city = "Fort Collins"
state = "Colorado"
countryOrRegion = "USA"
postalCode = "80525"
}
}
}
# A UPN can also be used as -UserId.
Update-MgBetaUserProfileEducationalActivity -UserId $userId -EducationalActivityId $educationalActivityId -BodyParameter $params
重要
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ版で使用可能なすべての型、プロパティ、API がサポートされているわけではありません。 SDK を使用してベータ API にアクセスする方法の詳細については、「ベータ API で Microsoft Graph SDK を使用する」を参照してください。
from msgraph import GraphServiceClient
from msgraph.generated.models.educational_activity import EducationalActivity
from msgraph.generated.models.institution_data import InstitutionData
from msgraph.generated.models.physical_address import PhysicalAddress
graph_client = GraphServiceClient(credentials, scopes)
request_body = EducationalActivity(
institution = InstitutionData(
location = PhysicalAddress(
type = PhysicalAddressType.Business,
post_office_box = None,
street = "12000 E Prospect Rd",
city = "Fort Collins",
state = "Colorado",
country_or_region = "USA",
postal_code = "80525",
),
),
)
result = await graph_client.me.profile.educational_activities.by_educational_activity_id('educationalActivity-id').patch(request_body)
重要
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ版で使用可能なすべての型、プロパティ、API がサポートされているわけではありません。 SDK を使用してベータ API にアクセスする方法の詳細については、「ベータ API で Microsoft Graph SDK を使用する」を参照してください。