Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.
Permission type
Least privileged permissions
Higher privileged permissions
Delegated (work or school account)
SearchConfiguration.Read.All
SearchConfiguration.ReadWrite.All
Delegated (personal Microsoft account)
Not supported.
Not supported.
Application
SearchConfiguration.Read.All
SearchConfiguration.ReadWrite.All
HTTP request
POST /search/acronyms
Request headers
Name
Description
Authorization
Bearer {token}. Required.
Content-Type
application/json. Required.
Request body
In the request body, supply a JSON representation of the acronym object.
The following table shows the properties that are available when you create an acronym.
Property
Type
Description
description
String
A brief description of the acronym that gives users more information about the acronym and what it stands for. Inherited from searchAnswer.
displayName
String
The actual short form or acronym. Inherited from searchAnswer.
standsFor
String
What the acronym stands for.
state
microsoft.graph.search.answerState
State of the acronym. Possible values are: published, draft, excluded, unknownFutureValue.
webUrl
String
The URL of the page or website where users can go for more information about the acronym. Inherited from searchAnswer.
Response
If successful, this method returns a 201 Created response code with the ID of the acronym created.
POST https://graph.microsoft.com/v1.0/search/acronyms
Content-Type: application/json
{
"displayName": "DNN",
"standsFor": "Deep Neural Network",
"description": "A deep neural network is a neural network with a certain level of complexity, a neural network with more than two layers.",
"webUrl": "http://microsoft.com/deep-neural-network",
"state": "draft"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models.Search;
var requestBody = new Acronym
{
DisplayName = "DNN",
StandsFor = "Deep Neural Network",
Description = "A deep neural network is a neural network with a certain level of complexity, a neural network with more than two layers.",
WebUrl = "http://microsoft.com/deep-neural-network",
State = AnswerState.Draft,
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Search.Acronyms.PostAsync(requestBody);
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc search acronyms create --body '{\
"displayName": "DNN",\
"standsFor": "Deep Neural Network",\
"description": "A deep neural network is a neural network with a certain level of complexity, a neural network with more than two layers.",\
"webUrl": "http://microsoft.com/deep-neural-network",\
"state": "draft"\
}\
'
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphmodelssearch "github.com/microsoftgraph/msgraph-sdk-go/models/search"
//other-imports
)
graphClient := msgraphsdk.NewGraphServiceClientWithCredentials(cred, scopes)
requestBody := graphmodelssearch.NewAcronym()
displayName := "DNN"
requestBody.SetDisplayName(&displayName)
standsFor := "Deep Neural Network"
requestBody.SetStandsFor(&standsFor)
description := "A deep neural network is a neural network with a certain level of complexity, a neural network with more than two layers."
requestBody.SetDescription(&description)
webUrl := "http://microsoft.com/deep-neural-network"
requestBody.SetWebUrl(&webUrl)
state := graphmodels.DRAFT_ANSWERSTATE
requestBody.SetState(&state)
acronyms, err := graphClient.Search().Acronyms().Post(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.models.search.Acronym acronym = new com.microsoft.graph.models.search.Acronym();
acronym.setDisplayName("DNN");
acronym.setStandsFor("Deep Neural Network");
acronym.setDescription("A deep neural network is a neural network with a certain level of complexity, a neural network with more than two layers.");
acronym.setWebUrl("http://microsoft.com/deep-neural-network");
acronym.setState(com.microsoft.graph.models.search.AnswerState.Draft);
com.microsoft.graph.models.search.Acronym result = graphClient.search().acronyms().post(acronym);
const options = {
authProvider,
};
const client = Client.init(options);
const acronym = {
displayName: 'DNN',
standsFor: 'Deep Neural Network',
description: 'A deep neural network is a neural network with a certain level of complexity, a neural network with more than two layers.',
webUrl: 'http://microsoft.com/deep-neural-network',
state: 'draft'
};
await client.api('/search/acronyms')
.post(acronym);
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\Acronym;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new Acronym();
$requestBody->setDisplayName('DNN');
$requestBody->setStandsFor('Deep Neural Network');
$requestBody->setDescription('A deep neural network is a neural network with a certain level of complexity, a neural network with more than two layers.');
$requestBody->setWebUrl('http://microsoft.com/deep-neural-network');
$requestBody->setState(new AnswerState('draft'));
$result = $graphServiceClient->search()->acronyms()->post($requestBody)->wait();
Import-Module Microsoft.Graph.Search
$params = @{
displayName = "DNN"
standsFor = "Deep Neural Network"
description = "A deep neural network is a neural network with a certain level of complexity, a neural network with more than two layers."
webUrl = "http://microsoft.com/deep-neural-network"
state = "draft"
}
New-MgSearchAcronym -BodyParameter $params
from msgraph import GraphServiceClient
from msgraph.generated.models.acronym import Acronym
graph_client = GraphServiceClient(credentials, scopes)
request_body = Acronym(
display_name = "DNN",
stands_for = "Deep Neural Network",
description = "A deep neural network is a neural network with a certain level of complexity, a neural network with more than two layers.",
web_url = "http://microsoft.com/deep-neural-network",
state = AnswerState.Draft,
)
result = await graph_client.search.acronyms.post(request_body)
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see: https://aka.ms/ContentUserFeedback.