Rufen Sie das Standardmäßige Organisationsbrandingobjekt ab, wenn der Accept-Language-Header auf 0 oder defaultfestgelegt ist. Wenn kein standardmäßiges Organisationsbrandingobjekt vorhanden ist, gibt diese Methode einen Fehler zurück 404 Not Found .
Wenn der Accept-Language-Header auf ein vorhandenes Gebietsschema festgelegt ist, das durch den Wert seiner ID identifiziert wird, ruft diese Methode das Branding für das angegebene Gebietsschema ab.
Diese Methode ruft nur nicht Stream Eigenschaften ab, z. B. usernameHintText und signInPageText. Um Stream Typen des Standardbrandings abzurufen, z. B. bannerLogo und backgroundImage, verwenden Sie die METHODE GET organizationalBrandingLocalization.
Wählen Sie für diese API die Als am wenigsten privilegierten Berechtigungen gekennzeichneten Berechtigungen aus. Verwenden Sie nur dann eine Berechtigung mit höheren Berechtigungen , wenn dies für Ihre App erforderlich ist. Ausführliche Informationen zu delegierten Berechtigungen und Anwendungsberechtigungen finden Sie unter Berechtigungstypen. Weitere Informationen zu diesen Berechtigungen finden Sie in der Berechtigungsreferenz.
Bei delegierten Szenarien muss der angemeldete Benutzer mindestens über die Rolle Globaler Leser oder OrganisationsbrandingadministratorMicrosoft Entra verfügen.
HTTP-Anforderung
GET /organization/{organizationId}/branding
Optionale Abfrageparameter
Diese Methode unterstützt nur den $select OData-Abfrageparameter, um die Antwort anzupassen. Allgemeine Informationen finden Sie unter OData-Abfrageparameter.
Ein gültiges ISO 639-1-Gebietsschema. Erforderlich.
Anforderungstext
Geben Sie keinen Anforderungstext für diese Methode an.
Antwort
Wenn die Methode erfolgreich verläuft, werden der 200 OK Antwortcode und ein organizationalBranding-Objekt im Antworttext zurückgegeben. Wenn kein Standardbrandingobjekt vorhanden ist, gibt diese Methode einen 404 Not Found Antwortcode zurück.
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 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");
});
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 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");
});
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 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");
});
Beispiel 4: Abrufen des BannerLogos für das Standardgebietsschema
Im folgenden Beispiel wird das bannerLogo-Objekt für das Standardgebietsschema zurückgegeben. Um Stream Objekttypen abzurufen, z. B. bannerLogo, verwenden Sie die Get organizationalBrandingLocalization-Methode. Sie können den Wert von id als default oder 0 in der Anforderungs-URL angeben. Wenn die Eigenschaft nicht festgelegt ist, gibt die Anforderung eine leere Antwort zurück.
Anforderung
Das folgende Beispiel zeigt eine Anfrage.
GET https://graph.microsoft.com/v1.0/organization/d69179bf-f4a4-41a9-a9de-249c0f2efb1d/branding/localizations/default/bannerLogo
Antwort
Das folgende Beispiel zeigt die Antwort.
HTTP/1.1 200 OK
Content-Type: image/*
<Image>
Beispiel 5: Abrufen des BannerLogos für das Standardgebietsschema, wenn es nicht festgelegt ist
Im folgenden Beispiel wird das bannerLogo-Objekt zurückgegeben, das für das Standardgebietsschema nicht festgelegt wurde.
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();
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc organization branding localizations banner-logo get --organization-id {organization-id} --organizational-branding-localization-id {organizationalBrandingLocalization-id}
// 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();
Bald verfügbar: Im Laufe des Jahres 2024 werden wir GitHub-Issues stufenweise als Feedbackmechanismus für Inhalte abbauen und durch ein neues Feedbacksystem ersetzen. Weitere Informationen finden Sie unter https://aka.ms/ContentUserFeedback.