// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Models;
var requestBody = new PersonWebsite
{
Categories = new List<string>
{
"football",
},
DisplayName = "Lyn Damer",
WebUrl = "www.lyndamer.no",
};
// 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.Websites.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.NewPersonWebsite()
categories := []string {
"football",
}
requestBody.SetCategories(categories)
displayName := "Lyn Damer"
requestBody.SetDisplayName(&displayName)
webUrl := "www.lyndamer.no"
requestBody.SetWebUrl(&webUrl)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
websites, err := graphClient.Me().Profile().Websites().Post(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
PersonWebsite personWebsite = new PersonWebsite();
LinkedList<String> categories = new LinkedList<String>();
categories.add("football");
personWebsite.setCategories(categories);
personWebsite.setDisplayName("Lyn Damer");
personWebsite.setWebUrl("www.lyndamer.no");
PersonWebsite result = graphClient.me().profile().websites().post(personWebsite);
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.models.person_website import PersonWebsite
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = PersonWebsite(
categories = [
"football",
],
display_name = "Lyn Damer",
web_url = "www.lyndamer.no",
)
result = await graph_client.me.profile.websites.post(request_body)