Microsoft Searchを使用すると、管理者は、検索用語を組織に固有の意味または Web ページに関連付け、これらの関連付けを検索回答として含めることができます。 たとえば、organizationのユーザーは、内部プロジェクト名、またはチーム Web ページに関連付けられているチーム名を表す、なじみのない頭字語に陥ることがあります。 管理者は、Search & インテリジェンスの下で、Microsoft 365 管理センターで頭字語、ブックマーク、または QnA を設定できます。 これにより、ユーザーは検索を使用して移動し、作業に慣れ親しみます。
POST https://graph.microsoft.com/v1.0/search/acronyms
Content-Type: application/json
{
"displayName": "GDPR",
"standsFor": "General Data Protection Regulation",
"description": "A European Union (EU) regulation on data protection and privacy in the EU and the European Economic Area (EEA) that enhances individuals' control and rights over their personal data, simplifies the regulatory environment for international business, and addresses the transfer of personal data outside the EU and EEA areas.",
"webUrl": "http://contoso.com/GDPR",
"state": "published"
}
// 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 = "GDPR",
StandsFor = "General Data Protection Regulation",
Description = "A European Union (EU) regulation on data protection and privacy in the EU and the European Economic Area (EEA) that enhances individuals' control and rights over their personal data, simplifies the regulatory environment for international business, and addresses the transfer of personal data outside the EU and EEA areas.",
WebUrl = "http://contoso.com/GDPR",
State = AnswerState.Published,
};
// 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);
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
mgc search acronyms create --body '{\
"displayName": "GDPR",\
"standsFor": "General Data Protection Regulation",\
"description": "A European Union (EU) regulation on data protection and privacy in the EU and the European Economic Area (EEA) that enhances individuals' control and rights over their personal data, simplifies the regulatory environment for international business, and addresses the transfer of personal data outside the EU and EEA areas.",\
"webUrl": "http://contoso.com/GDPR",\
"state": "published"\
}\
'
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphmodelssearch "github.com/microsoftgraph/msgraph-sdk-go/models/search"
//other-imports
)
requestBody := graphmodelssearch.NewAcronym()
displayName := "GDPR"
requestBody.SetDisplayName(&displayName)
standsFor := "General Data Protection Regulation"
requestBody.SetStandsFor(&standsFor)
description := "A European Union (EU) regulation on data protection and privacy in the EU and the European Economic Area (EEA) that enhances individuals' control and rights over their personal data, simplifies the regulatory environment for international business, and addresses the transfer of personal data outside the EU and EEA areas."
requestBody.SetDescription(&description)
webUrl := "http://contoso.com/GDPR"
requestBody.SetWebUrl(&webUrl)
state := graphmodels.PUBLISHED_ANSWERSTATE
requestBody.SetState(&state)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
acronyms, err := graphClient.Search().Acronyms().Post(context.Background(), requestBody, nil)
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
// 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("GDPR");
acronym.setStandsFor("General Data Protection Regulation");
acronym.setDescription("A European Union (EU) regulation on data protection and privacy in the EU and the European Economic Area (EEA) that enhances individuals' control and rights over their personal data, simplifies the regulatory environment for international business, and addresses the transfer of personal data outside the EU and EEA areas.");
acronym.setWebUrl("http://contoso.com/GDPR");
acronym.setState(com.microsoft.graph.models.search.AnswerState.Published);
com.microsoft.graph.models.search.Acronym result = graphClient.search().acronyms().post(acronym);
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
const options = {
authProvider,
};
const client = Client.init(options);
const acronym = {
displayName: 'GDPR',
standsFor: 'General Data Protection Regulation',
description: 'A European Union (EU) regulation on data protection and privacy in the EU and the European Economic Area (EEA) that enhances individuals\' control and rights over their personal data, simplifies the regulatory environment for international business, and addresses the transfer of personal data outside the EU and EEA areas.',
webUrl: 'http://contoso.com/GDPR',
state: 'published'
};
await client.api('/search/acronyms')
.post(acronym);
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\Search\Acronym;
use Microsoft\Graph\Generated\Models\Search\AnswerState;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new Acronym();
$requestBody->setDisplayName('GDPR');
$requestBody->setStandsFor('General Data Protection Regulation');
$requestBody->setDescription('A European Union (EU) regulation on data protection and privacy in the EU and the European Economic Area (EEA) that enhances individuals\' control and rights over their personal data, simplifies the regulatory environment for international business, and addresses the transfer of personal data outside the EU and EEA areas.');
$requestBody->setWebUrl('http://contoso.com/GDPR');
$requestBody->setState(new AnswerState('published'));
$result = $graphServiceClient->search()->acronyms()->post($requestBody)->wait();
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
Import-Module Microsoft.Graph.Search
$params = @{
displayName = "GDPR"
standsFor = "General Data Protection Regulation"
description = "A European Union (EU) regulation on data protection and privacy in the EU and the European Economic Area (EEA) that enhances individuals' control and rights over their personal data, simplifies the regulatory environment for international business, and addresses the transfer of personal data outside the EU and EEA areas."
webUrl = "http://contoso.com/GDPR"
state = "published"
}
New-MgSearchAcronym -BodyParameter $params
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.search.acronym import Acronym
from msgraph.generated.models.answer_state import AnswerState
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = Acronym(
display_name = "GDPR",
stands_for = "General Data Protection Regulation",
description = "A European Union (EU) regulation on data protection and privacy in the EU and the European Economic Area (EEA) that enhances individuals' control and rights over their personal data, simplifies the regulatory environment for international business, and addresses the transfer of personal data outside the EU and EEA areas.",
web_url = "http://contoso.com/GDPR",
state = AnswerState.Published,
)
result = await graph_client.search.acronyms.post(request_body)
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
POST https://graph.microsoft.com/v1.0/search/bookmarks
Content-Type: application/json
{
"displayName": "Contoso Install Site",
"webUrl": "http://www.contoso.com/",
"description": "Try or buy Contoso for Home or Business and view product information",
"keywords": {
"keywords": ["Contoso", "install"],
"reservedKeywords": ["Contoso"],
"matchSimilarKeywords": true
},
"state": "published"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models.Search;
var requestBody = new Bookmark
{
DisplayName = "Contoso Install Site",
WebUrl = "http://www.contoso.com/",
Description = "Try or buy Contoso for Home or Business and view product information",
Keywords = new AnswerKeyword
{
Keywords = new List<string>
{
"Contoso",
"install",
},
ReservedKeywords = new List<string>
{
"Contoso",
},
MatchSimilarKeywords = true,
},
State = AnswerState.Published,
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Search.Bookmarks.PostAsync(requestBody);
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
mgc search bookmarks create --body '{\
"displayName": "Contoso Install Site",\
"webUrl": "http://www.contoso.com/",\
"description": "Try or buy Contoso for Home or Business and view product information",\
"keywords": {\
"keywords": ["Contoso", "install"],\
"reservedKeywords": ["Contoso"],\
"matchSimilarKeywords": true\
},\
"state": "published"\
}\
'
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphmodelssearch "github.com/microsoftgraph/msgraph-sdk-go/models/search"
//other-imports
)
requestBody := graphmodelssearch.NewBookmark()
displayName := "Contoso Install Site"
requestBody.SetDisplayName(&displayName)
webUrl := "http://www.contoso.com/"
requestBody.SetWebUrl(&webUrl)
description := "Try or buy Contoso for Home or Business and view product information"
requestBody.SetDescription(&description)
keywords := graphmodelssearch.NewAnswerKeyword()
keywords := []string {
"Contoso",
"install",
}
keywords.SetKeywords(keywords)
reservedKeywords := []string {
"Contoso",
}
keywords.SetReservedKeywords(reservedKeywords)
matchSimilarKeywords := true
keywords.SetMatchSimilarKeywords(&matchSimilarKeywords)
requestBody.SetKeywords(keywords)
state := graphmodels.PUBLISHED_ANSWERSTATE
requestBody.SetState(&state)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
bookmarks, err := graphClient.Search().Bookmarks().Post(context.Background(), requestBody, nil)
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.models.search.Bookmark bookmark = new com.microsoft.graph.models.search.Bookmark();
bookmark.setDisplayName("Contoso Install Site");
bookmark.setWebUrl("http://www.contoso.com/");
bookmark.setDescription("Try or buy Contoso for Home or Business and view product information");
com.microsoft.graph.models.search.AnswerKeyword keywords = new com.microsoft.graph.models.search.AnswerKeyword();
LinkedList<String> keywords1 = new LinkedList<String>();
keywords1.add("Contoso");
keywords1.add("install");
keywords.setKeywords(keywords1);
LinkedList<String> reservedKeywords = new LinkedList<String>();
reservedKeywords.add("Contoso");
keywords.setReservedKeywords(reservedKeywords);
keywords.setMatchSimilarKeywords(true);
bookmark.setKeywords(keywords);
bookmark.setState(com.microsoft.graph.models.search.AnswerState.Published);
com.microsoft.graph.models.search.Bookmark result = graphClient.search().bookmarks().post(bookmark);
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
const options = {
authProvider,
};
const client = Client.init(options);
const bookmark = {
displayName: 'Contoso Install Site',
webUrl: 'http://www.contoso.com/',
description: 'Try or buy Contoso for Home or Business and view product information',
keywords: {
keywords: ['Contoso', 'install'],
reservedKeywords: ['Contoso'],
matchSimilarKeywords: true
},
state: 'published'
};
await client.api('/search/bookmarks')
.post(bookmark);
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\Search\Bookmark;
use Microsoft\Graph\Generated\Models\Search\AnswerKeyword;
use Microsoft\Graph\Generated\Models\Search\AnswerState;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new Bookmark();
$requestBody->setDisplayName('Contoso Install Site');
$requestBody->setWebUrl('http://www.contoso.com/');
$requestBody->setDescription('Try or buy Contoso for Home or Business and view product information');
$keywords = new AnswerKeyword();
$keywords->setKeywords(['Contoso', 'install', ]);
$keywords->setReservedKeywords(['Contoso', ]);
$keywords->setMatchSimilarKeywords(true);
$requestBody->setKeywords($keywords);
$requestBody->setState(new AnswerState('published'));
$result = $graphServiceClient->search()->bookmarks()->post($requestBody)->wait();
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
Import-Module Microsoft.Graph.Search
$params = @{
displayName = "Contoso Install Site"
webUrl = "http://www.contoso.com/"
description = "Try or buy Contoso for Home or Business and view product information"
keywords = @{
keywords = @(
"Contoso"
"install"
)
reservedKeywords = @(
"Contoso"
)
matchSimilarKeywords = $true
}
state = "published"
}
New-MgSearchBookmark -BodyParameter $params
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.search.bookmark import Bookmark
from msgraph.generated.models.search.answer_keyword import AnswerKeyword
from msgraph.generated.models.answer_state import AnswerState
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = Bookmark(
display_name = "Contoso Install Site",
web_url = "http://www.contoso.com/",
description = "Try or buy Contoso for Home or Business and view product information",
keywords = AnswerKeyword(
keywords = [
"Contoso",
"install",
],
reserved_keywords = [
"Contoso",
],
match_similar_keywords = True,
),
state = AnswerState.Published,
)
result = await graph_client.search.bookmarks.post(request_body)
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。