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"
}
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var personAnnotation = new PersonAnnotation
{
Detail = new ItemBody
{
ContentType = BodyType.Text,
Content = "I am originally from Australia, but grew up in Moscow, Russia."
},
DisplayName = "About Me"
};
await graphClient.Me.Profile.Notes
.Request()
.AddAsync(personAnnotation);
GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
PersonAnnotation personAnnotation = new PersonAnnotation();
ItemBody detail = new ItemBody();
detail.contentType = BodyType.TEXT;
detail.content = "I am originally from Australia, but grew up in Moscow, Russia.";
personAnnotation.detail = detail;
personAnnotation.displayName = "About Me";
graphClient.me().profile().notes()
.buildRequest()
.post(personAnnotation);
//THE GO SDK IS IN PREVIEW. NON-PRODUCTION USE ONLY
graphClient := msgraphsdk.NewGraphServiceClient(requestAdapter)
requestBody := msgraphsdk.NewPersonAnnotation()
detail := msgraphsdk.NewItemBody()
requestBody.SetDetail(detail)
contentType := "text"
detail.SetContentType(&contentType)
content := "I am originally from Australia, but grew up in Moscow, Russia."
detail.SetContent(&content)
displayName := "About Me"
requestBody.SetDisplayName(&displayName)
result, err := graphClient.Me().Profile().Notes().Post(requestBody)
Import-Module Microsoft.Graph.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-MgUserProfileNote -UserId $userId -BodyParameter $params