Récupérez l’objet de marque d’organisation par défaut, si l’en-tête Accept-Language est défini sur 0 ou default. S’il n’existe aucun objet de marque d’organisation par défaut, cette méthode renvoie une 404 Not Found erreur.
Si l’en-tête Accept-Language est défini sur des paramètres régionaux existants identifiés par la valeur de son ID, cette méthode récupère la personnalisation des paramètres régionaux spécifiés.
Cette méthode récupère uniquement les propriétés non Stream, par exemple usernameHintText et signInPageText. Pour récupérer Stream types de la personnalisation par défaut, par exemple bannerLogo et backgroundImage, utilisez la méthode GET organizationalBrandingLocalization.
Dans les scénarios délégués avec des comptes professionnels ou scolaires, l’utilisateur connecté doit se voir attribuer un rôle Microsoft Entra pris en charge ou un rôle personnalisé avec une autorisation de rôle prise en charge.
Lecteur général ou Administrateur de la marque organisationnelle sont les rôles les moins privilégiés pris en charge pour cette opération.
Requête HTTP
GET /organization/{organizationId}/branding
Paramètres facultatifs de la requête
Cette méthode prend uniquement en charge le $select paramètre de requête OData pour vous aider à personnaliser la réponse. Pour des informations générales, consultez paramètres de la requête OData.
Paramètres régionaux ISO 639-1 valides. Obligatoire.
Corps de la demande
N’indiquez pas le corps de la demande pour cette méthode.
Réponse
Si elle réussit, cette méthode renvoie un 200 OK code de réponse et un objet organizationalBranding dans le corps de la réponse. S’il n’existe aucun objet de personnalisation par défaut, cette méthode renvoie un 404 Not Found code de réponse.
Exemples
Exemple 1 : Obtenir la personnalisation par défaut
GET https://graph.microsoft.com/v1.0/organization/dcd219dd-bc68-4b9b-bf0b-4a33a796be35/branding
Accept-Language: 0
// 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.Organization["{organization-id}"].Branding.GetAsync((requestConfiguration) =>
{
requestConfiguration.Headers.Add("Accept-Language", "0");
});
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
abstractions "github.com/microsoft/kiota-abstractions-go"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphorganization "github.com/microsoftgraph/msgraph-sdk-go/organization"
//other-imports
)
headers := abstractions.NewRequestHeaders()
headers.Add("Accept-Language", "0")
configuration := &graphorganization.OrganizationItemBrandingRequestBuilderGetRequestConfiguration{
Headers: headers,
}
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
branding, err := graphClient.Organization().ByOrganizationId("organization-id").Branding().Get(context.Background(), configuration)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
OrganizationalBranding result = graphClient.organization().byOrganizationId("{organization-id}").branding().get(requestConfiguration -> {
requestConfiguration.headers.add("Accept-Language", "0");
});
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.organization.item.branding.branding_request_builder import BrandingRequestBuilder
from kiota_abstractions.base_request_configuration import RequestConfiguration
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_configuration = RequestConfiguration()
request_configuration.headers.add("Accept-Language", "0")
result = await graph_client.organization.by_organization_id('organization-id').branding.get(request_configuration = request_configuration)
GET https://graph.microsoft.com/v1.0/organization/dcd219dd-bc68-4b9b-bf0b-4a33a796be35/branding
Accept-Language: 0
// 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.Organization["{organization-id}"].Branding.GetAsync((requestConfiguration) =>
{
requestConfiguration.Headers.Add("Accept-Language", "0");
});
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
abstractions "github.com/microsoft/kiota-abstractions-go"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphorganization "github.com/microsoftgraph/msgraph-sdk-go/organization"
//other-imports
)
headers := abstractions.NewRequestHeaders()
headers.Add("Accept-Language", "0")
configuration := &graphorganization.OrganizationItemBrandingRequestBuilderGetRequestConfiguration{
Headers: headers,
}
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
branding, err := graphClient.Organization().ByOrganizationId("organization-id").Branding().Get(context.Background(), configuration)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
OrganizationalBranding result = graphClient.organization().byOrganizationId("{organization-id}").branding().get(requestConfiguration -> {
requestConfiguration.headers.add("Accept-Language", "0");
});
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.organization.item.branding.branding_request_builder import BrandingRequestBuilder
from kiota_abstractions.base_request_configuration import RequestConfiguration
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_configuration = RequestConfiguration()
request_configuration.headers.add("Accept-Language", "0")
result = await graph_client.organization.by_organization_id('organization-id').branding.get(request_configuration = request_configuration)
GET https://graph.microsoft.com/v1.0/organization/dcd219dd-bc68-4b9b-bf0b-4a33a796be35/branding
Accept-Language: fr-FR
// 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.Organization["{organization-id}"].Branding.GetAsync((requestConfiguration) =>
{
requestConfiguration.Headers.Add("Accept-Language", "fr-FR");
});
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
abstractions "github.com/microsoft/kiota-abstractions-go"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphorganization "github.com/microsoftgraph/msgraph-sdk-go/organization"
//other-imports
)
headers := abstractions.NewRequestHeaders()
headers.Add("Accept-Language", "fr-FR")
configuration := &graphorganization.OrganizationItemBrandingRequestBuilderGetRequestConfiguration{
Headers: headers,
}
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
branding, err := graphClient.Organization().ByOrganizationId("organization-id").Branding().Get(context.Background(), configuration)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
OrganizationalBranding result = graphClient.organization().byOrganizationId("{organization-id}").branding().get(requestConfiguration -> {
requestConfiguration.headers.add("Accept-Language", "fr-FR");
});
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.organization.item.branding.branding_request_builder import BrandingRequestBuilder
from kiota_abstractions.base_request_configuration import RequestConfiguration
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_configuration = RequestConfiguration()
request_configuration.headers.add("Accept-Language", "fr-FR")
result = await graph_client.organization.by_organization_id('organization-id').branding.get(request_configuration = request_configuration)
Exemple 4 : Obtenir le bannerLogo pour les paramètres régionaux par défaut
L’exemple suivant renvoie l’objet bannerLogo pour les paramètres régionaux par défaut. Pour récupérer Stream types d’objets, par exemple bannerLogo, utilisez la méthode Get organizationalBrandingLocalization. Vous pouvez spécifier la valeur id en tant que default ou 0 dans l’URL de la requête. Si la propriété n’est pas définie, la requête renvoie une réponse vide.
Demande
L’exemple suivant illustre une demande.
GET https://graph.microsoft.com/v1.0/organization/d69179bf-f4a4-41a9-a9de-249c0f2efb1d/branding/localizations/default/bannerLogo
Réponse
L’exemple suivant illustre la réponse.
HTTP/1.1 200 OK
Content-Type: image/*
<Image>
Exemple 5 : Obtenir le bannerLogo pour les paramètres régionaux par défaut lorsqu’il n’est pas défini
L’exemple suivant retourne l’objet bannerLogo qui n’avait pas été défini pour les paramètres régionaux par défaut.
GET https://graph.microsoft.com/v1.0/organization/d69179bf-f4a4-41a9-a9de-249c0f2efb1d/branding/localizations/default/bannerLogo
// 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
await graphClient.Organization["{organization-id}"].Branding.Localizations["{organizationalBrandingLocalization-id}"].BannerLogo.GetAsync();
// 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"
//other-imports
)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
graphClient.Organization().ByOrganizationId("organization-id").Branding().Localizations().ByOrganizationalBrandingLocalizationId("organizationalBrandingLocalization-id").BannerLogo().Get(context.Background(), nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
graphClient.organization().byOrganizationId("{organization-id}").branding().localizations().byOrganizationalBrandingLocalizationId("{organizationalBrandingLocalization-id}").bannerLogo().get();
<?php
use Microsoft\Graph\GraphServiceClient;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$graphServiceClient->organization()->byOrganizationId('organization-id')->branding()->localizations()->byOrganizationalBrandingLocalizationId('organizationalBrandingLocalization-id')->bannerLogo()->get()->wait();
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
await graph_client.organization.by_organization_id('organization-id').branding.localizations.by_organizational_branding_localization_id('organizationalBrandingLocalization-id').banner_logo.get()