// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Models;
var requestBody = new WebAccount
{
WebUrl = "https://github.com/innocenty.popov",
};
// 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.WebAccounts["{webAccount-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.NewWebAccount()
webUrl := "https://github.com/innocenty.popov"
requestBody.SetWebUrl(&webUrl)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
webAccounts, err := graphClient.Me().Profile().WebAccounts().ByWebAccountId("webAccount-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);
WebAccount webAccount = new WebAccount();
webAccount.setWebUrl("https://github.com/innocenty.popov");
WebAccount result = graphClient.me().profile().webAccounts().byWebAccountId("{webAccount-id}").patch(webAccount);
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Models\WebAccount;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new WebAccount();
$requestBody->setWebUrl('https://github.com/innocenty.popov');
$result = $graphServiceClient->me()->profile()->webAccounts()->byWebAccountId('webAccount-id')->patch($requestBody)->wait();
Import-Module Microsoft.Graph.Beta.People
$params = @{
webUrl = "https://github.com/innocenty.popov"
}
# A UPN can also be used as -UserId.
Update-MgBetaUserProfileWebAccount -UserId $userId -WebAccountId $webAccountId -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.web_account import WebAccount
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = WebAccount(
web_url = "https://github.com/innocenty.popov",
)
result = await graph_client.me.profile.web_accounts.by_web_account_id('webAccount-id').patch(request_body)