POST https://graph.microsoft.com/beta/me/profile/notes
Content-Type: application/json
{
"detail": {
"contentType": "text",
"content": "I am originally from Australia, but grew up in Moscow, Russia."
},
"displayName": "About Me"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Models;
var requestBody = new PersonAnnotation
{
Detail = new ItemBody
{
ContentType = BodyType.Text,
Content = "I am originally from Australia, but grew up in Moscow, Russia.",
},
DisplayName = "About Me",
};
// 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.Notes.PostAsync(requestBody);
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc-beta users profile notes create --user-id {user-id} --body '{\
"detail": {\
"contentType": "text",\
"content": "I am originally from Australia, but grew up in Moscow, Russia."\
},\
"displayName": "About Me"\
}\
'
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
PersonAnnotation personAnnotation = new PersonAnnotation();
ItemBody detail = new ItemBody();
detail.setContentType(BodyType.Text);
detail.setContent("I am originally from Australia, but grew up in Moscow, Russia.");
personAnnotation.setDetail(detail);
personAnnotation.setDisplayName("About Me");
PersonAnnotation result = graphClient.me().profile().notes().post(personAnnotation);
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\PersonAnnotation;
use Microsoft\Graph\Generated\Models\ItemBody;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new PersonAnnotation();
$detail = new ItemBody();
$detail->setContentType(new BodyType('text'));
$detail->setContent('I am originally from Australia, but grew up in Moscow, Russia.');
$requestBody->setDetail($detail);
$requestBody->setDisplayName('About Me');
$result = $graphServiceClient->me()->profile()->notes()->post($requestBody)->wait();
Import-Module Microsoft.Graph.Beta.People
$params = @{
detail = @{
contentType = "text"
content = "I am originally from Australia, but grew up in Moscow, Russia."
}
displayName = "About Me"
}
# A UPN can also be used as -UserId.
New-MgBetaUserProfileNote -UserId $userId -BodyParameter $params
from msgraph import GraphServiceClient
from msgraph.generated.models.person_annotation import PersonAnnotation
from msgraph.generated.models.item_body import ItemBody
graph_client = GraphServiceClient(credentials, scopes)
request_body = PersonAnnotation(
detail = ItemBody(
content_type = BodyType.Text,
content = "I am originally from Australia, but grew up in Moscow, Russia.",
),
display_name = "About Me",
)
result = await graph_client.me.profile.notes.post(request_body)