Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.
In the request body, supply only the values for properties to update. Existing properties that aren't included in the request body maintain their previous values or are recalculated based on changes to other property values.
The following table specifies the properties that can be updated.
Property
Type
Description
description
String
The description of the community. Maximum length is 1,024 characters.
displayName
String
The name of the community. Maximum length is 255 characters.
PATCH https://graph.microsoft.com/v1.0/employeeExperience/communities/eyJfdHlwZSI6Ikdyb3VwIiwiaWQiOiI4MzIxMjc1In0
Content-Type: application/json
{
"displayName": "Financial Advice for Software Engineers",
"description": "A community where financial advisors who represent customers from software engineering profession can discuss advice and suggestions for their clients.",
"privacy": "public"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new Community
{
DisplayName = "Financial Advice for Software Engineers",
Description = "A community where financial advisors who represent customers from software engineering profession can discuss advice and suggestions for their clients.",
Privacy = CommunityPrivacy.Public,
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.EmployeeExperience.Communities["{community-id}"].PatchAsync(requestBody);
mgc employee-experience communities patch --community-id {community-id} --body '{\
"displayName": "Financial Advice for Software Engineers",\
"description": "A community where financial advisors who represent customers from software engineering profession can discuss advice and suggestions for their clients.",\
"privacy": "public"\
}\
'
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphmodels "github.com/microsoftgraph/msgraph-sdk-go/models"
//other-imports
)
requestBody := graphmodels.NewCommunity()
displayName := "Financial Advice for Software Engineers"
requestBody.SetDisplayName(&displayName)
description := "A community where financial advisors who represent customers from software engineering profession can discuss advice and suggestions for their clients."
requestBody.SetDescription(&description)
privacy := graphmodels.PUBLIC_COMMUNITYPRIVACY
requestBody.SetPrivacy(&privacy)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
communities, err := graphClient.EmployeeExperience().Communities().ByCommunityId("community-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);
Community community = new Community();
community.setDisplayName("Financial Advice for Software Engineers");
community.setDescription("A community where financial advisors who represent customers from software engineering profession can discuss advice and suggestions for their clients.");
community.setPrivacy(CommunityPrivacy.Public);
Community result = graphClient.employeeExperience().communities().byCommunityId("{community-id}").patch(community);
const options = {
authProvider,
};
const client = Client.init(options);
const community = {
displayName: 'Financial Advice for Software Engineers',
description: 'A community where financial advisors who represent customers from software engineering profession can discuss advice and suggestions for their clients.',
privacy: 'public'
};
await client.api('/employeeExperience/communities/eyJfdHlwZSI6Ikdyb3VwIiwiaWQiOiI4MzIxMjc1In0')
.update(community);
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\Community;
use Microsoft\Graph\Generated\Models\CommunityPrivacy;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new Community();
$requestBody->setDisplayName('Financial Advice for Software Engineers');
$requestBody->setDescription('A community where financial advisors who represent customers from software engineering profession can discuss advice and suggestions for their clients.');
$requestBody->setPrivacy(new CommunityPrivacy('public'));
$result = $graphServiceClient->employeeExperience()->communities()->byCommunityId('community-id')->patch($requestBody)->wait();
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.community import Community
from msgraph.generated.models.community_privacy import CommunityPrivacy
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = Community(
display_name = "Financial Advice for Software Engineers",
description = "A community where financial advisors who represent customers from software engineering profession can discuss advice and suggestions for their clients.",
privacy = CommunityPrivacy.Public,
)
result = await graph_client.employee_experience.communities.by_community_id('community-id').patch(request_body)