As APIs na versão /beta no Microsoft Graph estão sujeitas a alterações. Não há suporte para o uso dessas APIs em aplicativos de produção. Para determinar se uma API está disponível na v1.0, use o seletor de versão.
A tabela a seguir mostra as propriedades que são possíveis de definir ao criar um novo objeto educationalActivity no perfil de um usuário.
Propriedade
Tipo
Descrição
allowedAudiences
Cadeia de caracteres
As audiências que são capazes de ver os valores contidos na entidade. Herdado do itemFacet. Os valores possíveis são: me, family, contacts, groupMembers, organization, federatedOrganizations, everyone, unknownFutureValue.
completionMonthYear
Data
O mês e o ano em que o usuário se formou ou concluiu a atividade.
endMonthYear
Data
O mês e o ano em que o usuário concluiu a atividade educacional referenciada.
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);
Importante
Os SDKs do Microsoft Graph usam a versão v1.0 da API por padrão e não dão suporte a todos os tipos, propriedades e APIs disponíveis na versão beta. Para obter detalhes sobre como acessar a API beta com o SDK, consulte Usar os SDKs do Microsoft Graph com a API beta.
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);
Importante
Os SDKs do Microsoft Graph usam a versão v1.0 da API por padrão e não dão suporte a todos os tipos, propriedades e APIs disponíveis na versão beta. Para obter detalhes sobre como acessar a API beta com o SDK, consulte Usar os SDKs do Microsoft Graph com a API beta.
Os SDKs do Microsoft Graph usam a versão v1.0 da API por padrão e não dão suporte a todos os tipos, propriedades e APIs disponíveis na versão beta. Para obter detalhes sobre como acessar a API beta com o SDK, consulte Usar os SDKs do Microsoft Graph com a API beta.
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);
Importante
Os SDKs do Microsoft Graph usam a versão v1.0 da API por padrão e não dão suporte a todos os tipos, propriedades e APIs disponíveis na versão beta. Para obter detalhes sobre como acessar a API beta com o SDK, consulte Usar os SDKs do Microsoft Graph com a API beta.
//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)
Importante
Os SDKs do Microsoft Graph usam a versão v1.0 da API por padrão e não dão suporte a todos os tipos, propriedades e APIs disponíveis na versão beta. Para obter detalhes sobre como acessar a API beta com o SDK, consulte Usar os SDKs do Microsoft Graph com a API beta.
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
Importante
Os SDKs do Microsoft Graph usam a versão v1.0 da API por padrão e não dão suporte a todos os tipos, propriedades e APIs disponíveis na versão beta. Para obter detalhes sobre como acessar a API beta com o SDK, consulte Usar os SDKs do Microsoft Graph com a API beta.