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 projectParticipation 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.
categories
Coleção de cadeias de caracteres
Contém categorias que um usuário associou ao projeto (por exemplo, transformação digital, plataforma de petróleo).
Contém informações detalhadas sobre o cliente para o que o projeto era.
collaborationTags
Coleção String
Contém marcas de cenário de experiência que um usuário associou aos juros. Os valores permitidos na coleção são: askMeAboutableToMentor , , , wantsToLearnwantsToImprove .
POST https://graph.microsoft.com/beta/me/profile/projects
Content-type: application/json
{
"categories": [
"Branding"
],
"client": {
"displayName": "Contoso Ltd.",
"department": "Corporate Marketing",
"webUrl": "https://www.contoso.com"
},
"displayName": "Contoso Re-branding Project",
"detail": {
"company": {
"displayName": "Adventureworks Inc.",
"department": "Consulting",
"webUrl": "https://adventureworks.com"
},
"description": "Rebranding of Contoso Ltd.",
"jobTitle": "Lead PM Rebranding",
"role": "project management",
"summary": "A 6 month project to help Contoso rebrand after they were divested from a parent organization."
}
}
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var projectParticipation = new ProjectParticipation
{
Categories = new List<String>()
{
"Branding"
},
Client = new CompanyDetail
{
DisplayName = "Contoso Ltd.",
Department = "Corporate Marketing",
WebUrl = "https://www.contoso.com"
},
DisplayName = "Contoso Re-branding Project",
Detail = new PositionDetail
{
Company = new CompanyDetail
{
DisplayName = "Adventureworks Inc.",
Department = "Consulting",
WebUrl = "https://adventureworks.com"
},
Description = "Rebranding of Contoso Ltd.",
JobTitle = "Lead PM Rebranding",
Role = "project management",
Summary = "A 6 month project to help Contoso rebrand after they were divested from a parent organization."
}
};
await graphClient.Me.Profile.Projects
.Request()
.AddAsync(projectParticipation);
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 projectParticipation = {
categories: [
'Branding'
],
client: {
displayName: 'Contoso Ltd.',
department: 'Corporate Marketing',
webUrl: 'https://www.contoso.com'
},
displayName: 'Contoso Re-branding Project',
detail: {
company: {
displayName: 'Adventureworks Inc.',
department: 'Consulting',
webUrl: 'https://adventureworks.com'
},
description: 'Rebranding of Contoso Ltd.',
jobTitle: 'Lead PM Rebranding',
role: 'project management',
summary: 'A 6 month project to help Contoso rebrand after they were divested from a parent organization.'
}
};
await client.api('/me/profile/projects')
.version('beta')
.post(projectParticipation);
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();
ProjectParticipation projectParticipation = new ProjectParticipation();
LinkedList<String> categoriesList = new LinkedList<String>();
categoriesList.add("Branding");
projectParticipation.categories = categoriesList;
CompanyDetail client = new CompanyDetail();
client.displayName = "Contoso Ltd.";
client.department = "Corporate Marketing";
client.webUrl = "https://www.contoso.com";
projectParticipation.client = client;
projectParticipation.displayName = "Contoso Re-branding Project";
PositionDetail detail = new PositionDetail();
CompanyDetail company = new CompanyDetail();
company.displayName = "Adventureworks Inc.";
company.department = "Consulting";
company.webUrl = "https://adventureworks.com";
detail.company = company;
detail.description = "Rebranding of Contoso Ltd.";
detail.jobTitle = "Lead PM Rebranding";
detail.role = "project management";
detail.summary = "A 6 month project to help Contoso rebrand after they were divested from a parent organization.";
projectParticipation.detail = detail;
graphClient.me().profile().projects()
.buildRequest()
.post(projectParticipation);
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.NewProjectParticipation()
requestBody.SetCategories( []String {
"Branding",
}
client := msgraphsdk.NewCompanyDetail()
requestBody.SetClient(client)
displayName := "Contoso Ltd."
client.SetDisplayName(&displayName)
department := "Corporate Marketing"
client.SetDepartment(&department)
webUrl := "https://www.contoso.com"
client.SetWebUrl(&webUrl)
displayName := "Contoso Re-branding Project"
requestBody.SetDisplayName(&displayName)
detail := msgraphsdk.NewPositionDetail()
requestBody.SetDetail(detail)
company := msgraphsdk.NewCompanyDetail()
detail.SetCompany(company)
displayName := "Adventureworks Inc."
company.SetDisplayName(&displayName)
department := "Consulting"
company.SetDepartment(&department)
webUrl := "https://adventureworks.com"
company.SetWebUrl(&webUrl)
description := "Rebranding of Contoso Ltd."
detail.SetDescription(&description)
jobTitle := "Lead PM Rebranding"
detail.SetJobTitle(&jobTitle)
role := "project management"
detail.SetRole(&role)
summary := "A 6 month project to help Contoso rebrand after they were divested from a parent organization."
detail.SetSummary(&summary)
result, err := graphClient.Me().Profile().Projects().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 = @{
Categories = @(
"Branding"
)
Client = @{
DisplayName = "Contoso Ltd."
Department = "Corporate Marketing"
WebUrl = "https://www.contoso.com"
}
DisplayName = "Contoso Re-branding Project"
Detail = @{
Company = @{
DisplayName = "Adventureworks Inc."
Department = "Consulting"
WebUrl = "https://adventureworks.com"
}
Description = "Rebranding of Contoso Ltd."
JobTitle = "Lead PM Rebranding"
Role = "project management"
Summary = "A 6 month project to help Contoso rebrand after they were divested from a parent organization."
}
}
# A UPN can also be used as -UserId.
New-MgUserProfileProject -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.