// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Models;
var requestBody = new LanguageProficiency
{
DisplayName = "Norwegian Bokmål",
Tag = "nb-NO",
Spoken = LanguageProficiencyLevel.NativeOrBilingual,
Written = LanguageProficiencyLevel.NativeOrBilingual,
Reading = LanguageProficiencyLevel.NativeOrBilingual,
};
// 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.PostAsync(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()
displayName := "Norwegian Bokmål"
requestBody.SetDisplayName(&displayName)
tag := "nb-NO"
requestBody.SetTag(&tag)
spoken := graphmodels.NATIVEORBILINGUAL_LANGUAGEPROFICIENCYLEVEL
requestBody.SetSpoken(&spoken)
written := graphmodels.NATIVEORBILINGUAL_LANGUAGEPROFICIENCYLEVEL
requestBody.SetWritten(&written)
reading := graphmodels.NATIVEORBILINGUAL_LANGUAGEPROFICIENCYLEVEL
requestBody.SetReading(&reading)
// 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().Post(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.setDisplayName("Norwegian Bokmål");
languageProficiency.setTag("nb-NO");
languageProficiency.setSpoken(LanguageProficiencyLevel.NativeOrBilingual);
languageProficiency.setWritten(LanguageProficiencyLevel.NativeOrBilingual);
languageProficiency.setReading(LanguageProficiencyLevel.NativeOrBilingual);
LanguageProficiency result = graphClient.me().profile().languages().post(languageProficiency);
Import-Module Microsoft.Graph.Beta.People
$params = @{
displayName = "Norwegian Bokmål"
tag = "nb-NO"
spoken = "nativeOrBilingual"
written = "nativeOrBilingual"
reading = "nativeOrBilingual"
}
# A UPN can also be used as -UserId.
New-MgBetaUserProfileLanguage -UserId $userId -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.language_proficiency_level import LanguageProficiencyLevel
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = LanguageProficiency(
display_name = "Norwegian Bokmål",
tag = "nb-NO",
spoken = LanguageProficiencyLevel.NativeOrBilingual,
written = LanguageProficiencyLevel.NativeOrBilingual,
reading = LanguageProficiencyLevel.NativeOrBilingual,
)
result = await graph_client.me.profile.languages.post(request_body)