The Message Template Branding Options. Branding is defined in the Intune Admin Console. Possible values are: none, includeCompanyLogo, includeCompanyName, includeContactInformation, includeCompanyPortalLink, includeDeviceDetails, unknownFutureValue.
roleScopeTagIds
String collection
List of Scope Tags for this Entity instance.
Response
If successful, this method returns a 201 Created response code and a notificationMessageTemplate object in the response body.
POST https://graph.microsoft.com/v1.0/deviceManagement/notificationMessageTemplates
Content-type: application/json
Content-length: 259
{
"@odata.type": "#microsoft.graph.notificationMessageTemplate",
"displayName": "Display Name value",
"defaultLocale": "Default Locale value",
"brandingOptions": "includeCompanyLogo",
"roleScopeTagIds": [
"Role Scope Tag Ids value"
]
}
// 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.PostAsync(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().Post(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().post(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()->post($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.post(request_body)
Here is an example of the response. Note: The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.