Namespace: microsoft.graph
Aktualisieren Sie die Eigenschaften eines organizationalBrandingLocalization-Objekts für eine bestimmte Lokalisierung.
Diese API ist in den folgenden nationalen Cloudbereitstellungen verfügbar.
Weltweiter Service |
US Government L4 |
US Government L5 (DOD) |
China, betrieben von 21Vianet |
✅ |
✅ |
✅ |
✅ |
Berechtigungen
Wählen Sie die Berechtigungen aus, die für diese API als am wenigsten privilegiert markiert sind. Verwenden Sie eine höhere Berechtigung oder Berechtigungen nur, wenn Ihre App dies erfordert. Ausführliche Informationen zu delegierten Berechtigungen und Anwendungsberechtigungen finden Sie unter Berechtigungstypen. Weitere Informationen zu diesen Berechtigungen finden Sie in der Berechtigungsreferenz.
Berechtigungstyp |
Berechtigungen mit den geringsten Berechtigungen |
Berechtigungen mit höheren Berechtigungen |
Delegiert (Geschäfts-, Schul- oder Unikonto) |
OrganizationalBranding.ReadWrite.All |
Organization.ReadWrite.All |
Delegiert (persönliches Microsoft-Konto) |
Nicht unterstützt |
Nicht unterstützt |
Anwendung |
OrganizationalBranding.ReadWrite.All |
Organization.ReadWrite.All |
Wichtig
In delegierten Szenarien mit Geschäfts-, Schul- oder Unikonten muss dem angemeldeten Benutzer eine unterstützte Microsoft Entra Rolle oder eine benutzerdefinierte Rolle mit einer unterstützten Rollenberechtigung zugewiesen werden.
Der Organisationsbrandingadministrator ist die Rolle mit den geringsten Berechtigungen, die für diesen Vorgang unterstützt wird.
HTTP-Anforderung
Um String-Datentypen wie signInPageText und usernameHintText zu aktualisieren, verwenden Sie die PATCH-Methode. Verwenden Sie die PUT-Methode, um Stream Datentypen wie backgroundLogo und backgroundImage zu aktualisieren. Sie können Stream Typen nicht mit anderen Datentypen in derselben Anforderung aktualisieren.
PATCH /organization/{organizationId}/branding/localizations/{organizationalBrandingLocalizationId}
PUT /organization/{organizationId}/branding/localizations/{organizationalBrandingLocalizationId}/{Stream object type such as backgroundImage}
Anforderungstext
Geben Sie im Anforderungstext nur die Werte für die Eigenschaften an, die aktualisiert werden sollen. Vorhandene Eigenschaften, die nicht im Anforderungstext enthalten sind, behalten ihre vorherigen Werte oder werden basierend auf Änderungen an anderen Eigenschaftswerten neu berechnet.
In der folgenden Tabelle sind die Eigenschaften angegeben, die aktualisiert werden können.
Eigenschaft |
Typ |
Beschreibung |
backgroundColor |
String |
Farbe, die anstelle des Hintergrundbilds in Verbindungen mit geringer Bandbreite angezeigt wird. Es wird empfohlen, die Primärfarbe Ihres Bannerlogos oder Ihre organization Farbe zu verwenden. Geben Sie dies im Hexadezimalformat an, z. B. ist #FFFFFF weiß . |
backgroundImage |
Stream |
Abbildung, die als Hintergrund der Anmeldeseite angezeigt wird. Die zulässigen Typen sind PNG oder JPEG nicht kleiner als 300 KB und nicht größer als 1920 × 1080 Pixel. Ein kleineres Bild reduziert die Bandbreitenanforderungen und führt dazu, dass die Seite schneller geladen wird. |
bannerLogo |
Stream |
Eine Bannerversion Ihres Unternehmenslogos, die auf der Anmeldeseite angezeigt wird. Die zulässigen Typen sind PNG oder JPEG, die nicht größer als 36 × 245 Pixel sind. Es wird empfohlen, ein transparentes Bild ohne Abstand um das Logo zu verwenden. |
signInPageText |
String |
Text, der unten im Anmeldefeld angezeigt wird. Sie können dies verwenden, um zusätzliche Informationen wie die Telefonnummer an Ihren Helpdesk oder eine rechtliche Erklärung zu übermitteln. Dieser Text darf Unicode sein und darf 1024 Zeichen nicht überschreiten. |
squareLogo |
Stream |
Eine quadratische Version Ihres Unternehmenslogos, die in Windows 10 Out-of-Box-Umgebungen (OOBE) angezeigt wird und wenn Windows Autopilot für die Bereitstellung aktiviert ist. Zulässige Typen sind PNG oder JPEG, die nicht größer als 240 x 240 Pixel und nicht mehr als 10 KB groß sind. Es wird empfohlen, ein transparentes Bild ohne Abstand um das Logo zu verwenden. |
usernameHintText |
String |
Zeichenfolge, die als Hinweis im Textfeld benutzername auf dem Anmeldebildschirm angezeigt wird. Bei diesem Text muss es sich um einen Unicode-Text ohne Links oder Code handeln und darf 64 Zeichen nicht überschreiten. |
Antwort
Wenn die Methode erfolgreich verläuft, wird der Antwortcode 204 No Content
zurückgegeben.
Beispiele
Beispiel 1: Festlegen von bannerLogo für die fr-FR-Lokalisierung mithilfe von PUT
Die folgende Anforderung aktualisiert das Bannerlogo für die Lokalisierung von fr-FR.
Anforderung
Das folgende Beispiel zeigt eine Anfrage.
PUT https://graph.microsoft.com/v1.0/organization/d69179bf-f4a4-41a9-a9de-249c0f2efb1d/branding/localizations/fr-FR/bannerLogo
Content-Type: image/jpeg
<Image>
Antwort
HTTP/1.1 204 NO CONTENT
Beispiel 2: Aktualisieren von backgroundColor und signInPageText für die fr-FR-Lokalisierung mithilfe von PATCH
Die folgende Anforderung aktualisiert das Bannerlogo für die fr-FR
Lokalisierung.
Anforderung
Das folgende Beispiel zeigt eine Anfrage.
PATCH https://graph.microsoft.com/v1.0/organization/d69179bf-f4a4-41a9-a9de-249c0f2efb1d/branding/localizations/fr-FR
Content-Type: application/json
{
"backgroundColor":"#00000F",
"signInPageText": "Welcome to Contoso France"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new OrganizationalBrandingLocalization
{
BackgroundColor = "#00000F",
SignInPageText = "Welcome to Contoso France",
};
// 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.Localizations["{organizationalBrandingLocalization-id}"].PatchAsync(requestBody);
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
// 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.NewOrganizationalBrandingLocalization()
backgroundColor := "#00000F"
requestBody.SetBackgroundColor(&backgroundColor)
signInPageText := "Welcome to Contoso France"
requestBody.SetSignInPageText(&signInPageText)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
localizations, err := graphClient.Organization().ByOrganizationId("organization-id").Branding().Localizations().ByOrganizationalBrandingLocalizationId("organizationalBrandingLocalization-id").Patch(context.Background(), requestBody, nil)
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
OrganizationalBrandingLocalization organizationalBrandingLocalization = new OrganizationalBrandingLocalization();
organizationalBrandingLocalization.setBackgroundColor("#00000F");
organizationalBrandingLocalization.setSignInPageText("Welcome to Contoso France");
OrganizationalBrandingLocalization result = graphClient.organization().byOrganizationId("{organization-id}").branding().localizations().byOrganizationalBrandingLocalizationId("{organizationalBrandingLocalization-id}").patch(organizationalBrandingLocalization);
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
const options = {
authProvider,
};
const client = Client.init(options);
const organizationalBrandingLocalization = {
backgroundColor: '#00000F',
signInPageText: 'Welcome to Contoso France'
};
await client.api('/organization/d69179bf-f4a4-41a9-a9de-249c0f2efb1d/branding/localizations/fr-FR')
.update(organizationalBrandingLocalization);
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\OrganizationalBrandingLocalization;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new OrganizationalBrandingLocalization();
$requestBody->setBackgroundColor('#00000F');
$requestBody->setSignInPageText('Welcome to Contoso France');
$result = $graphServiceClient->organization()->byOrganizationId('organization-id')->branding()->localizations()->byOrganizationalBrandingLocalizationId('organizationalBrandingLocalization-id')->patch($requestBody)->wait();
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
Import-Module Microsoft.Graph.Identity.DirectoryManagement
$params = @{
backgroundColor = "#00000F"
signInPageText = "Welcome to Contoso France"
}
Update-MgOrganizationBrandingLocalization -OrganizationId $organizationId -OrganizationalBrandingLocalizationId $organizationalBrandingLocalizationId -BodyParameter $params
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.organizational_branding_localization import OrganizationalBrandingLocalization
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = OrganizationalBrandingLocalization(
background_color = "#00000F",
sign_in_page_text = "Welcome to Contoso France",
)
result = await graph_client.organization.by_organization_id('organization-id').branding.localizations.by_organizational_branding_localization_id('organizationalBrandingLocalization-id').patch(request_body)
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
Antwort
HTTP/1.1 204 No Content
Beispiel 3: Überschreiben eines Standardbrandingwerts mit einer leeren Zeichenfolge
Anforderung
Das folgende Beispiel zeigt eine Anfrage.
PATCH https://graph.microsoft.com/v1.0/organization/d69179bf-f4a4-41a9-a9de-249c0f2efb1d/branding/localizations/fr-FR
Content-Type: application/json
{
"signInPageText": "Welcome to Contoso France.",
"usernameHintText":" "
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new OrganizationalBrandingLocalization
{
SignInPageText = "Welcome to Contoso France.",
UsernameHintText = " ",
};
// 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.Localizations["{organizationalBrandingLocalization-id}"].PatchAsync(requestBody);
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
// 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.NewOrganizationalBrandingLocalization()
signInPageText := "Welcome to Contoso France."
requestBody.SetSignInPageText(&signInPageText)
usernameHintText := " "
requestBody.SetUsernameHintText(&usernameHintText)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
localizations, err := graphClient.Organization().ByOrganizationId("organization-id").Branding().Localizations().ByOrganizationalBrandingLocalizationId("organizationalBrandingLocalization-id").Patch(context.Background(), requestBody, nil)
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
OrganizationalBrandingLocalization organizationalBrandingLocalization = new OrganizationalBrandingLocalization();
organizationalBrandingLocalization.setSignInPageText("Welcome to Contoso France.");
organizationalBrandingLocalization.setUsernameHintText(" ");
OrganizationalBrandingLocalization result = graphClient.organization().byOrganizationId("{organization-id}").branding().localizations().byOrganizationalBrandingLocalizationId("{organizationalBrandingLocalization-id}").patch(organizationalBrandingLocalization);
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
const options = {
authProvider,
};
const client = Client.init(options);
const organizationalBrandingLocalization = {
signInPageText: 'Welcome to Contoso France.',
usernameHintText: ' '
};
await client.api('/organization/d69179bf-f4a4-41a9-a9de-249c0f2efb1d/branding/localizations/fr-FR')
.update(organizationalBrandingLocalization);
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\OrganizationalBrandingLocalization;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new OrganizationalBrandingLocalization();
$requestBody->setSignInPageText('Welcome to Contoso France.');
$requestBody->setUsernameHintText(' ');
$result = $graphServiceClient->organization()->byOrganizationId('organization-id')->branding()->localizations()->byOrganizationalBrandingLocalizationId('organizationalBrandingLocalization-id')->patch($requestBody)->wait();
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
Import-Module Microsoft.Graph.Identity.DirectoryManagement
$params = @{
signInPageText = "Welcome to Contoso France."
usernameHintText = " "
}
Update-MgOrganizationBrandingLocalization -OrganizationId $organizationId -OrganizationalBrandingLocalizationId $organizationalBrandingLocalizationId -BodyParameter $params
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.organizational_branding_localization import OrganizationalBrandingLocalization
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = OrganizationalBrandingLocalization(
sign_in_page_text = "Welcome to Contoso France.",
username_hint_text = " ",
)
result = await graph_client.organization.by_organization_id('organization-id').branding.localizations.by_organizational_branding_localization_id('organizationalBrandingLocalization-id').patch(request_body)
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
Antwort
HTTP/1.1 204 No Content
Nach dieser Anforderung ist usernameHintText für die fr-FR
Lokalisierung leer, anstatt den Wert vom Standardbrandingobjekt zu erben.