Eine der nachfolgenden Berechtigungen ist erforderlich, um diese API aufrufen zu können. Weitere Informationen, unter anderem zur Auswahl von Berechtigungen, finden Sie unter Berechtigungen.
Berechtigungstyp
Berechtigungen (von der Berechtigung mit den wenigsten Rechten zu der mit den meisten Rechten)
Optionen für das Branding der Nachrichtenvorlage. Das Branding wird in der Intune-Verwaltungskonsole definiert. Mögliche Werte: none, includeCompanyLogo, includeCompanyName, includeContactInformation, includeCompanyPortalLink, includeDeviceDetails, unknownFutureValue.
roleScopeTagIds
Zeichenfolgensammlung
Liste der Bereichstags für diese entitätsbezogene instance.
Antwort
Bei erfolgreicher Ausführung gibt die Methode den Antwortcode 200 OK und ein aktualisiertes Objekt des Typs notificationMessageTemplate im Antworttext zurück.
Beispiel
Anforderung
Nachfolgend sehen Sie ein Beispiel der Anforderung.
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new NotificationMessageTemplate
{
OdataType = "#microsoft.graph.notificationMessageTemplate",
DisplayName = "Display Name value",
DefaultLocale = "Default Locale value",
BrandingOptions = NotificationTemplateBrandingOptions.IncludeCompanyLogo,
RoleScopeTagIds = new List<string>
{
"Role Scope Tag Ids value",
},
};
// 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}"].PatchAsync(requestBody);
// 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"
graphmodels "github.com/microsoftgraph/msgraph-sdk-go/models"
//other-imports
)
requestBody := graphmodels.NewNotificationMessageTemplate()
displayName := "Display Name value"
requestBody.SetDisplayName(&displayName)
defaultLocale := "Default Locale value"
requestBody.SetDefaultLocale(&defaultLocale)
brandingOptions := graphmodels.INCLUDECOMPANYLOGO_NOTIFICATIONTEMPLATEBRANDINGOPTIONS
requestBody.SetBrandingOptions(&brandingOptions)
roleScopeTagIds := []string {
"Role Scope Tag Ids value",
}
requestBody.SetRoleScopeTagIds(roleScopeTagIds)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
notificationMessageTemplates, err := graphClient.DeviceManagement().NotificationMessageTemplates().ByNotificationMessageTemplateId("notificationMessageTemplate-id").Patch(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
NotificationMessageTemplate notificationMessageTemplate = new NotificationMessageTemplate();
notificationMessageTemplate.setOdataType("#microsoft.graph.notificationMessageTemplate");
notificationMessageTemplate.setDisplayName("Display Name value");
notificationMessageTemplate.setDefaultLocale("Default Locale value");
notificationMessageTemplate.setBrandingOptions(EnumSet.of(NotificationTemplateBrandingOptions.IncludeCompanyLogo));
LinkedList<String> roleScopeTagIds = new LinkedList<String>();
roleScopeTagIds.add("Role Scope Tag Ids value");
notificationMessageTemplate.setRoleScopeTagIds(roleScopeTagIds);
NotificationMessageTemplate result = graphClient.deviceManagement().notificationMessageTemplates().byNotificationMessageTemplateId("{notificationMessageTemplate-id}").patch(notificationMessageTemplate);
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\NotificationMessageTemplate;
use Microsoft\Graph\Generated\Models\NotificationTemplateBrandingOptions;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new NotificationMessageTemplate();
$requestBody->setOdataType('#microsoft.graph.notificationMessageTemplate');
$requestBody->setDisplayName('Display Name value');
$requestBody->setDefaultLocale('Default Locale value');
$requestBody->setBrandingOptions(new NotificationTemplateBrandingOptions('includeCompanyLogo'));
$requestBody->setRoleScopeTagIds(['Role Scope Tag Ids value', ]);
$result = $graphServiceClient->deviceManagement()->notificationMessageTemplates()->byNotificationMessageTemplateId('notificationMessageTemplate-id')->patch($requestBody)->wait();
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.notification_message_template import NotificationMessageTemplate
from msgraph.generated.models.notification_template_branding_options import NotificationTemplateBrandingOptions
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = NotificationMessageTemplate(
odata_type = "#microsoft.graph.notificationMessageTemplate",
display_name = "Display Name value",
default_locale = "Default Locale value",
branding_options = NotificationTemplateBrandingOptions.IncludeCompanyLogo,
role_scope_tag_ids = [
"Role Scope Tag Ids value",
],
)
result = await graph_client.device_management.notification_message_templates.by_notification_message_template_id('notificationMessageTemplate-id').patch(request_body)
Nachfolgend sehen Sie ein Beispiel der Antwort. Hinweis: Das hier gezeigte Antwortobjekt ist möglicherweise aus Platzgründen abgeschnitten. Von einem tatsächlichen Aufruf werden alle Eigenschaften zurückgegeben.