// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Models;
var requestBody = new ProjectParticipation
{
AllowedAudiences = AllowedAudiences.Organization,
Client = new CompanyDetail
{
Department = "Corporate Marketing",
WebUrl = "https://www.contoso.com",
},
};
// 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.Projects["{projectParticipation-id}"].PatchAsync(requestBody);
// Code snippets are only available for the latest major version. Current major version is $v0.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
graphmodels "github.com/microsoftgraph/msgraph-beta-sdk-go/models"
//other-imports
)
requestBody := graphmodels.NewProjectParticipation()
allowedAudiences := graphmodels.ORGANIZATION_ALLOWEDAUDIENCES
requestBody.SetAllowedAudiences(&allowedAudiences)
client := graphmodels.NewCompanyDetail()
department := "Corporate Marketing"
client.SetDepartment(&department)
webUrl := "https://www.contoso.com"
client.SetWebUrl(&webUrl)
requestBody.SetClient(client)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
projects, err := graphClient.Me().Profile().Projects().ByProjectParticipationId("projectParticipation-id").Patch(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
ProjectParticipation projectParticipation = new ProjectParticipation();
projectParticipation.setAllowedAudiences(EnumSet.of(AllowedAudiences.Organization));
CompanyDetail client = new CompanyDetail();
client.setDepartment("Corporate Marketing");
client.setWebUrl("https://www.contoso.com");
projectParticipation.setClient(client);
ProjectParticipation result = graphClient.me().profile().projects().byProjectParticipationId("{projectParticipation-id}").patch(projectParticipation);
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Models\ProjectParticipation;
use Microsoft\Graph\Beta\Generated\Models\AllowedAudiences;
use Microsoft\Graph\Beta\Generated\Models\CompanyDetail;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new ProjectParticipation();
$requestBody->setAllowedAudiences(new AllowedAudiences('organization'));
$client = new CompanyDetail();
$client->setDepartment('Corporate Marketing');
$client->setWebUrl('https://www.contoso.com');
$requestBody->setClient($client);
$result = $graphServiceClient->me()->profile()->projects()->byProjectParticipationId('projectParticipation-id')->patch($requestBody)->wait();
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.models.project_participation import ProjectParticipation
from msgraph_beta.generated.models.allowed_audiences import AllowedAudiences
from msgraph_beta.generated.models.company_detail import CompanyDetail
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = ProjectParticipation(
allowed_audiences = AllowedAudiences.Organization,
client = CompanyDetail(
department = "Corporate Marketing",
web_url = "https://www.contoso.com",
),
)
result = await graph_client.me.profile.projects.by_project_participation_id('projectParticipation-id').patch(request_body)