// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Models;
var requestBody = new LanguageProficiency
{
AllowedAudiences = AllowedAudiences.Organization,
};
// 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.Languages["{languageProficiency-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.NewLanguageProficiency()
allowedAudiences := graphmodels.ORGANIZATION_ALLOWEDAUDIENCES
requestBody.SetAllowedAudiences(&allowedAudiences)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
languages, err := graphClient.Me().Profile().Languages().ByLanguageProficiencyId("languageProficiency-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);
LanguageProficiency languageProficiency = new LanguageProficiency();
languageProficiency.setAllowedAudiences(EnumSet.of(AllowedAudiences.Organization));
LanguageProficiency result = graphClient.me().profile().languages().byLanguageProficiencyId("{languageProficiency-id}").patch(languageProficiency);
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Models\LanguageProficiency;
use Microsoft\Graph\Beta\Generated\Models\AllowedAudiences;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new LanguageProficiency();
$requestBody->setAllowedAudiences(new AllowedAudiences('organization'));
$result = $graphServiceClient->me()->profile()->languages()->byLanguageProficiencyId('languageProficiency-id')->patch($requestBody)->wait();
Import-Module Microsoft.Graph.Beta.People
$params = @{
allowedAudiences = "organization"
}
# A UPN can also be used as -UserId.
Update-MgBetaUserProfileLanguage -UserId $userId -LanguageProficiencyId $languageProficiencyId -BodyParameter $params
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.models.language_proficiency import LanguageProficiency
from msgraph_beta.generated.models.allowed_audiences import AllowedAudiences
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = LanguageProficiency(
allowed_audiences = AllowedAudiences.Organization,
)
result = await graph_client.me.profile.languages.by_language_proficiency_id('languageProficiency-id').patch(request_body)