localizedNotificationMessages のリスト
[アーティクル]
08/11/2023
11 人の共同作成者
フィードバック
この記事の内容
名前空間: microsoft.graph
注: Intune 用 Microsoft Graph API には、テナントの有効な Intune ライセンス が必要です。
localizedNotificationMessage オブジェクトのプロパティとリレーションシップをリストします。
この API は、次の国内クラウド展開 で使用できます。
グローバル サービス
米国政府機関 L4
米国政府機関 L5 (DOD)
21Vianet が運営する中国
✅
✅
✅
✅
アクセス許可
この API を呼び出すには、次のいずれかのアクセス許可が必要です。 アクセス許可の選択方法などの詳細については、「アクセス許可 」を参照してください。
アクセス許可の種類
アクセス許可 (特権の小さいものから大きいものへ)
委任 (職場または学校のアカウント)
DeviceManagementServiceConfig.Read.All、DeviceManagementServiceConfig.ReadWrite.All
委任 (個人用 Microsoft アカウント)
サポートされていません。
アプリケーション
DeviceManagementServiceConfig.Read.All、DeviceManagementServiceConfig.ReadWrite.All
HTTP 要求
GET /deviceManagement/notificationMessageTemplates/{notificationMessageTemplateId}/localizedNotificationMessages
ヘッダー
値
Authorization
ベアラー {token}。 必須です。 認証と承認 の詳細については、こちらをご覧ください。
承諾
application/json
要求本文
このメソッドには、要求本文を指定しません。
応答
成功した場合、このメソッドは 200 OK
応答コードと、応答本文で localizedNotificationMessage オブジェクトのコレクションを返します。
例
要求
以下は、要求の例です。
GET https://graph.microsoft.com/v1.0/deviceManagement/notificationMessageTemplates/{notificationMessageTemplateId}/localizedNotificationMessages
// Code snippets are only available for the latest version. Current version is 5.x
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.DeviceManagement.NotificationMessageTemplates["{notificationMessageTemplate-id}"].LocalizedNotificationMessages.GetAsync();
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc device-management notification-message-templates localized-notification-messages list --notification-message-template-id {notificationMessageTemplate-id}
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
//other-imports
)
graphClient := msgraphsdk.NewGraphServiceClientWithCredentials(cred, scopes)
localizedNotificationMessages, err := graphClient.DeviceManagement().NotificationMessageTemplates().ByNotificationMessageTemplateId("notificationMessageTemplate-id").LocalizedNotificationMessages().Get(context.Background(), nil)
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
LocalizedNotificationMessageCollectionResponse result = graphClient.deviceManagement().notificationMessageTemplates().byNotificationMessageTemplateId("{notificationMessageTemplate-id}").localizedNotificationMessages().get();
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
const options = {
authProvider,
};
const client = Client.init(options);
let localizedNotificationMessages = await client.api('/deviceManagement/notificationMessageTemplates/{notificationMessageTemplateId}/localizedNotificationMessages')
.get();
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
<?php
use Microsoft\Graph\GraphServiceClient;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$result = $graphServiceClient->deviceManagement()->notificationMessageTemplates()->byNotificationMessageTemplateId('notificationMessageTemplate-id')->localizedNotificationMessages()->get()->wait();
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
Import-Module Microsoft.Graph.DeviceManagement
Get-MgDeviceManagementNotificationMessageTemplateLocalizedNotificationMessage -NotificationMessageTemplateId $notificationMessageTemplateId
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
from msgraph import GraphServiceClient
graph_client = GraphServiceClient(credentials, scopes)
result = await graph_client.device_management.notification_message_templates.by_notification_message_template_id('notificationMessageTemplate-id').localized_notification_messages.get()
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
応答
以下は、応答の例です。 注: 簡潔にするために、ここに示す応答オブジェクトは切り詰められている場合があります。 実際の呼び出しではすべてのプロパティが返されます。
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 374
{
"value": [
{
"@odata.type": "#microsoft.graph.localizedNotificationMessage",
"id": "7a777708-7708-7a77-0877-777a0877777a",
"lastModifiedDateTime": "2017-01-01T00:00:35.1329464-08:00",
"locale": "Locale value",
"subject": "Subject value",
"messageTemplate": "Message Template value",
"isDefault": true
}
]
}