Get organizationalBranding

Namespace: microsoft.graph

Retrieve the default organizational branding object, if the Accept-Language header is set to 0 or default. If no default organizational branding object exists, this method returns a 404 Not Found error.

If the Accept-Language header is set to an existing locale identified by the value of its id, this method retrieves the branding for the specified locale.

This method retrieves only non-Stream properties, for example, usernameHintText and signInPageText. To retrieve Stream types of the default branding, for example, bannerLogo and backgroundImage, use the GET organizationalBrandingLocalization method.

Permissions

One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.

Permission type Permissions (from least to most privileged)
Delegated (work or school account) User.Read, Organization.Read.All, User.ReadBasic.All, User.Read.All
Delegated (personal Microsoft account) Not supported.
Application Not supported.

HTTP request

GET /organization/{organizationId}/branding

Optional query parameters

This method supports only the $select OData query parameter to help customize the response. For general information, see OData query parameters.

Request headers

Name Description
Authorization Bearer {token}. Required.
Accept-Language A valid ISO 639-1 locale. Required.

Request body

Do not supply a request body for this method.

Response

If successful, this method returns a 200 OK response code and an organizationalBranding object in the response body. If no default branding object exists, this method returns a 404 Not Found response code.

Examples

Example 1: Get the default branding

Request

The following is an example of the request.

GET https://graph.microsoft.com/v1.0/organization/84841066-274d-4ec0-a5c1-276be684bdd3/branding
Accept-Language: 0

Response

The following is an example of the response.

Note: The response object shown here might be shortened for readability.

HTTP/1.1 200 OK
Content-Type: application/json

{
    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#branding",
    "@odata.id": "https://graph.microsoft.com/v2/99b24e1b-abec-4598-9d63-a2baf0a3cea1/directoryObjects/$/Microsoft.DirectoryServices.Organization('99b24e1b-abec-4598-9d63-a2baf0a3cea1')/branding/0",
    "id": "0",
    "backgroundColor": "",
    "backgroundImageRelativeUrl": "c1c6b6c8-urr-dzbkz44n5kuo9kzl1kziuujjcdqonoe2owyacso/logintenantbranding/0/illustration?ts=637535563816027796",
    "bannerLogoRelativeUrl": "c1c6b6c8-urr-dzbkz44n5kuo9kzl1kziuujjcdqonoe2owyacso/logintenantbranding/0/bannerlogo?ts=637535563824629275",
    "cdnList": [
        "secure.aadcdn.microsoftonline-p.com",
        "aadcdn.msftauthimages.net",
        "aadcdn.msauthimages.net"
    ],
    "signInPageText": "Contoso",
    "squareLogoRelativeUrl": "c1c6b6c8-urr-dzbkz44n5kuo9kzl1kziuujjcdqonoe2owyacso/logintenantbranding/0/tilelogo?ts=637535563832888580",
    "usernameHintText": ""
}

Example 2: Get organizational branding when no branding is configured

Request

The following is an example of the request.

GET https://graph.microsoft.com/v1.0/organization/d69179bf-f4a4-41a9-a9de-249c0f2efb1d/branding
Accept-Language: 0

Response

The following is an example of the response.

HTTP/1.1 404 Not Found

Example 3: Get organizational branding for the French locale

In the following example, the Accept-Language header is used specify to retrieve the fr-FR localization branding.

Request

The following is an example of the request.

GET https://graph.microsoft.com/v1.0/organization/d69179bf-f4a4-41a9-a9de-249c0f2efb1d/branding
Accept-Language: fr-FR

Response

The following is an example of the response.

Note: The response object shown here might be shortened for readability.

HTTP/1.1 200 OK
Content-Type: application/json

{
    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#branding",
    "@odata.id": "https://graph.microsoft.com/v2/84841066-274d-4ec0-a5c1-276be684bdd3/directoryObjects/$/Microsoft.DirectoryServices.Organization('84841066-274d-4ec0-a5c1-276be684bdd3')/branding/fr-FR",
    "id": "fr-FR",
    "backgroundColor": "#FFFF33",
    "backgroundImageRelativeUrl": null,
    "bannerLogoRelativeUrl": null,
    "cdnList": [],
    "signInPageText": " ",
    "squareLogoRelativeUrl": null,
    "usernameHintText": " "
}

Example 4: Get the bannerLogo for the default locale

The following example returns the bannerLogo object for the default locale. To retrieve Stream object types for example, bannerLogo, use the Get organizationalBrandingLocalizationmethod. You may specify the value of id as default or 0 in the request URL. If the property is not set, the request returns an empty response.

Request

The following is an example of the request.

GET https://graph.microsoft.com/v1.0/organization/d69179bf-f4a4-41a9-a9de-249c0f2efb1d/branding/localizations/default/bannerLogo

Response

The following is an example of the response.

HTTP/1.1 200 OK
Content-Type: image/*

<Image>

Example 5: Get the bannerLogo for the default locale when it is not set

The following example returns the bannerLogo object which hadn't been set for the default locale.

Request

The following is an example of the request.

GET https://graph.microsoft.com/v1.0/organization/d69179bf-f4a4-41a9-a9de-249c0f2efb1d/branding/localizations/default/bannerLogo

Response

The following is an example of the response.

HTTP/1.1 200 OK

{}