APIs unter der /beta Version in Microsoft Graph können geändert werden. Die Verwendung dieser APIs in Produktionsanwendungen wird nicht unterstützt. Um festzustellen, ob eine API in Version 1.0 verfügbar ist, verwenden Sie die Versionsauswahl .
Eine der nachfolgenden Berechtigungen ist erforderlich, um diese API aufrufen zu können. Weitere Informationen, unter anderem zur Auswahl von Berechtigungen, finden Sie im Artikel zum Thema Berechtigungen.
Berechtigungstyp
Berechtigungen (von der Berechtigung mit den wenigsten Rechten zu der mit den meisten Rechten)
Delegiert (Geschäfts-, Schul- oder Unikonto)
User.ReadWrite, User.ReadWrite.All
Delegiert (persönliches Microsoft-Konto)
User.ReadWrite, User.ReadWrite.All
Anwendung
User.ReadWrite.All
HTTP-Anforderung
POST /me/profile/educationalActivities
POST /users/{id | userPrincipalName}/profile/educationalActivities
In der folgenden Tabelle sind die Eigenschaften aufgeführt, die beim Erstellen eines neuen educationalActivity-Objekts im Profileines Benutzers festgelegt werden können.
Eigenschaft
Typ
Beschreibung
allowedAudiences
Zeichenfolge
Die Zielgruppen, die in der Lage sind, die in der Entität enthaltenen Werte anzuzeigen. Geerbt von itemFacet. Mögliche Werte: me, family, contacts, groupMembers, organization, federatedOrganizations, everyone, unknownFutureValue.
completionMonthYear
Datum
Monat und Jahr, in dem der Benutzer die Aktivität beendet oder abgeschlossen hat.
endMonthYear
Datum
Monat und Jahr, in dem der Benutzer die Bildungsaktivität abgeschlossen hat, auf die verwiesen wird.
POST /me/profile/educationalActivities
Content-type: application/json
{
"completionMonthYear": "Date",
"endMonthYear": "Date",
"institution": {
"description": null,
"displayName": "Colorado State University",
"location": {
"type": "business",
"postOfficeBox": null,
"street": "12000 E Prospect Rd",
"city": "Fort Collins",
"state": "Colorado",
"countryOrRegion": "USA",
"postalCode": "80525"
},
"webUrl": "https://www.colostate.edu"
},
"program": {
"abbreviation": "MBA",
"activities": null,
"awards": null,
"description": "Master of Business Administration with a major in Entreprenuership and Finance.",
"displayName": "Master of Business Administration",
"fieldsOfStudy": null,
"grade": "3.9",
"notes": null,
"webUrl": "https://biz.colostate.edu"
},
"startMonthYear": "Date"
}
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var educationalActivity = new EducationalActivity
{
CompletionMonthYear = new Date(1900,1,1),
EndMonthYear = new Date(1900,1,1),
Institution = new InstitutionData
{
Description = null,
DisplayName = "Colorado State University",
Location = new PhysicalAddress
{
Type = PhysicalAddressType.Business,
PostOfficeBox = null,
Street = "12000 E Prospect Rd",
City = "Fort Collins",
State = "Colorado",
CountryOrRegion = "USA",
PostalCode = "80525"
},
WebUrl = "https://www.colostate.edu"
},
Program = new EducationalActivityDetail
{
Abbreviation = "MBA",
Activities = null,
Awards = null,
Description = "Master of Business Administration with a major in Entreprenuership and Finance.",
DisplayName = "Master of Business Administration",
FieldsOfStudy = null,
Grade = "3.9",
Notes = null,
WebUrl = "https://biz.colostate.edu"
},
StartMonthYear = new Date(1900,1,1)
};
await graphClient.Me.Profile.EducationalActivities
.Request()
.AddAsync(educationalActivity);
Wichtig
Microsoft Graph SDKs verwenden standardmäßig die Version 1.0 der API und unterstützen nicht alle Typen, Eigenschaften und APIs, die in der Betaversion verfügbar sind. Ausführliche Informationen zum Zugreifen auf die Beta-API mit dem SDK finden Sie unter Verwenden der Microsoft Graph-SDKs mit der Beta-API.
const options = {
authProvider,
};
const client = Client.init(options);
const educationalActivity = {
completionMonthYear: 'Date',
endMonthYear: 'Date',
institution: {
description: null,
displayName: 'Colorado State University',
location: {
type: 'business',
postOfficeBox: null,
street: '12000 E Prospect Rd',
city: 'Fort Collins',
state: 'Colorado',
countryOrRegion: 'USA',
postalCode: '80525'
},
webUrl: 'https://www.colostate.edu'
},
program: {
abbreviation: 'MBA',
activities: null,
awards: null,
description: 'Master of Business Administration with a major in Entreprenuership and Finance.',
displayName: 'Master of Business Administration',
fieldsOfStudy: null,
grade: '3.9',
notes: null,
webUrl: 'https://biz.colostate.edu'
},
startMonthYear: 'Date'
};
await client.api('/me/profile/educationalActivities')
.version('beta')
.post(educationalActivity);
Wichtig
Microsoft Graph SDKs verwenden standardmäßig die Version 1.0 der API und unterstützen nicht alle Typen, Eigenschaften und APIs, die in der Betaversion verfügbar sind. Ausführliche Informationen zum Zugreifen auf die Beta-API mit dem SDK finden Sie unter Verwenden der Microsoft Graph-SDKs mit der Beta-API.
Microsoft Graph SDKs verwenden standardmäßig die Version 1.0 der API und unterstützen nicht alle Typen, Eigenschaften und APIs, die in der Betaversion verfügbar sind. Ausführliche Informationen zum Zugreifen auf die Beta-API mit dem SDK finden Sie unter Verwenden der Microsoft Graph-SDKs mit der Beta-API.
GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
EducationalActivity educationalActivity = new EducationalActivity();
educationalActivity.completionMonthYear = new DateOnly(1900,1,1);
educationalActivity.endMonthYear = new DateOnly(1900,1,1);
InstitutionData institution = new InstitutionData();
institution.description = null;
institution.displayName = "Colorado State University";
PhysicalAddress location = new PhysicalAddress();
location.type = PhysicalAddressType.BUSINESS;
location.postOfficeBox = null;
location.street = "12000 E Prospect Rd";
location.city = "Fort Collins";
location.state = "Colorado";
location.countryOrRegion = "USA";
location.postalCode = "80525";
institution.location = location;
institution.webUrl = "https://www.colostate.edu";
educationalActivity.institution = institution;
EducationalActivityDetail program = new EducationalActivityDetail();
program.abbreviation = "MBA";
program.activities = null;
program.awards = null;
program.description = "Master of Business Administration with a major in Entreprenuership and Finance.";
program.displayName = "Master of Business Administration";
program.fieldsOfStudy = null;
program.grade = "3.9";
program.notes = null;
program.webUrl = "https://biz.colostate.edu";
educationalActivity.program = program;
educationalActivity.startMonthYear = new DateOnly(1900,1,1);
graphClient.me().profile().educationalActivities()
.buildRequest()
.post(educationalActivity);
Wichtig
Microsoft Graph SDKs verwenden standardmäßig die Version 1.0 der API und unterstützen nicht alle Typen, Eigenschaften und APIs, die in der Betaversion verfügbar sind. Ausführliche Informationen zum Zugreifen auf die Beta-API mit dem SDK finden Sie unter Verwenden der Microsoft Graph-SDKs mit der Beta-API.
//THE GO SDK IS IN PREVIEW. NON-PRODUCTION USE ONLY
graphClient := msgraphsdk.NewGraphServiceClient(requestAdapter)
requestBody := msgraphsdk.NewEducationalActivity()
completionMonthYear := "Date"
requestBody.SetCompletionMonthYear(&completionMonthYear)
endMonthYear := "Date"
requestBody.SetEndMonthYear(&endMonthYear)
institution := msgraphsdk.NewInstitutionData()
requestBody.SetInstitution(institution)
institution.SetDescription(nil)
displayName := "Colorado State University"
institution.SetDisplayName(&displayName)
location := msgraphsdk.NewPhysicalAddress()
institution.SetLocation(location)
type := "business"
location.SetType(&type)
location.SetPostOfficeBox(nil)
street := "12000 E Prospect Rd"
location.SetStreet(&street)
city := "Fort Collins"
location.SetCity(&city)
state := "Colorado"
location.SetState(&state)
countryOrRegion := "USA"
location.SetCountryOrRegion(&countryOrRegion)
postalCode := "80525"
location.SetPostalCode(&postalCode)
webUrl := "https://www.colostate.edu"
institution.SetWebUrl(&webUrl)
program := msgraphsdk.NewEducationalActivityDetail()
requestBody.SetProgram(program)
abbreviation := "MBA"
program.SetAbbreviation(&abbreviation)
program.SetActivities(nil)
program.SetAwards(nil)
description := "Master of Business Administration with a major in Entreprenuership and Finance."
program.SetDescription(&description)
displayName := "Master of Business Administration"
program.SetDisplayName(&displayName)
program.SetFieldsOfStudy(nil)
grade := "3.9"
program.SetGrade(&grade)
program.SetNotes(nil)
webUrl := "https://biz.colostate.edu"
program.SetWebUrl(&webUrl)
startMonthYear := "Date"
requestBody.SetStartMonthYear(&startMonthYear)
result, err := graphClient.Me().Profile().EducationalActivities().Post(requestBody)
Wichtig
Microsoft Graph SDKs verwenden standardmäßig die Version 1.0 der API und unterstützen nicht alle Typen, Eigenschaften und APIs, die in der Betaversion verfügbar sind. Ausführliche Informationen zum Zugreifen auf die Beta-API mit dem SDK finden Sie unter Verwenden der Microsoft Graph-SDKs mit der Beta-API.
Import-Module Microsoft.Graph.People
$params = @{
CompletionMonthYear = "Date"
EndMonthYear = "Date"
Institution = @{
Description = $null
DisplayName = "Colorado State University"
Location = @{
Type = "business"
PostOfficeBox = $null
Street = "12000 E Prospect Rd"
City = "Fort Collins"
State = "Colorado"
CountryOrRegion = "USA"
PostalCode = "80525"
}
WebUrl = "https://www.colostate.edu"
}
Program = @{
Abbreviation = "MBA"
Activities = $null
Awards = $null
Description = "Master of Business Administration with a major in Entreprenuership and Finance."
DisplayName = "Master of Business Administration"
FieldsOfStudy = $null
Grade = "3.9"
Notes = $null
WebUrl = "https://biz.colostate.edu"
}
StartMonthYear = "Date"
}
# A UPN can also be used as -UserId.
New-MgUserProfileEducationalActivity -UserId $userId -BodyParameter $params
Wichtig
Microsoft Graph SDKs verwenden standardmäßig die Version 1.0 der API und unterstützen nicht alle Typen, Eigenschaften und APIs, die in der Betaversion verfügbar sind. Ausführliche Informationen zum Zugreifen auf die Beta-API mit dem SDK finden Sie unter Verwenden der Microsoft Graph-SDKs mit der Beta-API.