Skip to content

Latest commit

 

History

History
140 lines (105 loc) · 6.4 KB

File metadata and controls

140 lines (105 loc) · 6.4 KB
title Create organizationalBrandingLocalization
description Create a new organizationalBrandingLocalization object.
author nanguil
ms.localizationpriority medium
ms.subservice entra-sign-in
doc_type apiPageType
ms.date 04/05/2024

Create organizationalBrandingLocalization

Namespace: microsoft.graph

[!INCLUDE beta-disclaimer]

Create a new organizationalBrandingLocalization object. This creates a localized branding and at the same time, the default branding if it doesn't exist.

The default branding is created only once. It's loaded when a localized branding isn't configured for the user's browser language. To retrieve the default branding, see Get branding.

[!INCLUDE national-cloud-support]

Permissions

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.

[!INCLUDE permissions-table]

[!INCLUDE rbac-org-branding-apis-write]

HTTP request

This request creates a new localization branding and a default branding if one doesn't already exist.

POST /organization/{organizationId}/branding/localizations

Request headers

Name Description
Authorization Bearer {token}. Required. Learn more about authentication and authorization.
Content-Type application/json. Required.

Request body

The following table lists the properties that are required when you create the organizationalBrandingLocalization object.

Property Type Description
id String An identifier that represents the locale specified using culture names. Culture names follow the RFC 1766 standard in the format "languagecode2-country/regioncode2". The portion "languagecode2" is a lowercase two-letter code derived from ISO 639-1 and "country/regioncode2" is an uppercase two-letter code derived from ISO 3166. For example, U.S. English is en-US. You can't create the default branding by setting the value of id to the String types 0 or default.

NOTE: Multiple branding for a single locale are currently not supported.

Response

If successful, this method returns a 201 Created response code and an organizationalBrandingLocalization object in the response body.

Examples

The following example creates a branding localization for French (fr-FR) localization. Any unspecified properties of the String type inherit from the value in the default branding object. For example, if the signInPageText in the default branding object is null, the signInPageText for the fr-FR branding created in this request will also be null. To override a null value without any text, use a string containing only whitespace.

Request

The following example shows a request.

POST https://graph.microsoft.com/beta/organization/d69179bf-f4a4-41a9-a9de-249c0f2efb1d/branding/localizations
Content-Type: application/json

{
    "backgroundColor":"#00000F",
    "id": "fr-FR",
    "signInPageText": " "
}

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]


Response

The following example shows the response.

HTTP/1.1 201 Created
Content-Type: application/json

{
    "@odata.context": "https://graph.microsoft.com/beta/$metadata#organization('d69179bf-f4a4-41a9-a9de-249c0f2efb1d')/branding/localizations/$entity",
    "@odata.id": "https://graph.microsoft.com/v2/d69179bf-f4a4-41a9-a9de-249c0f2efb1d/directoryObjects/$/Microsoft.DirectoryServices.Organization('d69179bf-f4a4-41a9-a9de-249c0f2efb1d')//localizations/fr-FR",
    "id": "fr-FR",
    "backgroundColor": " ",
    "backgroundImageRelativeUrl": null,
    "bannerLogoRelativeUrl": null,
    "cdnList": [],
    "signInPageText": " ",
    "squareLogoRelativeUrl": null,
    "squareLogoDarkRelativeUrl": null,
    "usernameHintText": " "
}