organizationalBrandingLocalization の更新
[アーティクル]
06/29/2022
2 人の共同作成者
この記事の内容
名前空間: microsoft.graph
特定のローカライズに対して 、organizationalBrandingLocalization オブジェクトのプロパティを更新します。
アクセス許可
この API を呼び出すには、次のいずれかのアクセス許可が必要です。アクセス許可の選択方法などの詳細については、「アクセス許可 」を参照してください。
アクセス許可の種類
アクセス許可 (特権の小さいものから大きいものへ)
委任 (職場または学校のアカウント)
Organization.ReadWrite.All
委任 (個人用 Microsoft アカウント)
サポートされていません。
アプリケーション
サポートされていません。
HTTP 要求
STREAM データ型 ( backgroundLogo と backgroundImage を 含む) のみが PUT メソッドを使用して更新されます。 signInPageText と usernameHintText を含む String データ型を更新するには、PATCH メソッドを使用します。 同じ要求内の他のデータ型で Stream 型を更新することはできません。
PATCH /organization/{organizationId}/branding/localizations/{organizationalBrandingLocalizationId}
PUT /organization/{organizationId}/branding/localizations/{organizationalBrandingLocalizationId}/{backgroundImage | bannerLogo | squareLogo}
名前
説明
Authorization
ベアラー {token}。必須。
Content-Type
application/json. Required.
要求本文
要求本文では、更新する必要があるプロパティの値 のみ を指定します。要求本文に含まれていない既存のプロパティは、以前の値を保持するか、他のプロパティ値の変更に基づいて再計算されます。
次の表に、更新できるプロパティを示します。
プロパティ
型
説明
backgroundColor
String
低帯域幅接続で背景イメージの代わりに表示される色。 バナー ロゴまたは組織の色の主な色を使用することをお勧めします。 これを 16 進数形式で指定します。たとえば、白は #FFFFFF.
backgroundImage
ストリーム
サインイン ページの背景として表示される画像。 許可される型は PNG または JPEG で、300 KB より小さく、1920 × 1080 ピクセル未満です。 画像を小さくすると、帯域幅の要件が減り、ページの読み込みが速くなります。
bannerLogo
ストリーム
サインイン ページに表示される会社のロゴのバナー バージョン。 許可される型は、36 × 245 ピクセル以下の PNG または JPEG です。 ロゴを埋め込まない透明な画像を使用することをお勧めします。
signInPageText
String
サインイン ボックスの下部に表示されるテキスト。 これを使用して、電話番号などの追加情報をヘルプ デスクや法的声明に伝えることができます。 このテキストは Unicode でなければならず、1024 文字を超えないようにしてください。
squareLogo
ストリーム
既定のエクスペリエンス (OOBE) Windows 10と Windows Autopilot が展開に有効になっている場合に表示される、会社のロゴの正方形のバージョン。 使用できる型は、240 x 240 ピクセルを超えず、サイズが 10 KB 以下の PNG または JPEG です。 ロゴを埋め込まない透明な画像を使用することをお勧めします。
usernameHintText
String
サインイン画面のユーザー名ボックスにヒントとして表示される文字列。 このテキストは、リンクやコードを含まない Unicode である必要があり、64 文字を超えることはできません。
応答
成功した場合、このメソッドは 204 No Content 応答コードを返します。
例
例 1: PUT を使用して fr-FR ローカリゼーションの bannerLogo を設定する
次の要求は、fr-FR ローカリゼーションのバナー ロゴを更新します。
要求
要求の例を次に示します。
PUT https://graph.microsoft.com/v1.0/organization/d69179bf-f4a4-41a9-a9de-249c0f2efb1d/branding/localizations/fr-FR/bannerLogo
Content-Type: image/jpeg
<Image>
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
using var stream = new System.IO.MemoryStream(Encoding.UTF8.GetBytes(@"<Image>"));
await graphClient.Organization["{organization-id}"].Branding.Localizations["{organizationalBrandingLocalization-id}"].BannerLogo
.Request()
.PutAsync<OrganizationalBrandingLocalization>(stream);
SDK をプロジェクトに追加し、authProvider インスタンスを作成する 方法の詳細については、SDK のドキュメントを参照してください 。
const options = {
authProvider,
};
const client = Client.init(options);
const stream = <Image>;
await client.api('/organization/d69179bf-f4a4-41a9-a9de-249c0f2efb1d/branding/localizations/fr-FR/bannerLogo')
.put(stream);
SDK をプロジェクトに追加し、authProvider インスタンスを作成する 方法の詳細については、SDK のドキュメントを参照してください 。
GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
byte[] stream = Base64.getDecoder().decode("<Image>");
graphClient.organization("d69179bf-f4a4-41a9-a9de-249c0f2efb1d").branding().localizations("fr-FR")
.buildRequest()
.put(stream);
SDK をプロジェクトに追加し、authProvider インスタンスを作成する 方法の詳細については、SDK のドキュメントを参照してください 。
応答
HTTP/1.1 204 NO CONTENT
例 2: PATCH を使用して fr-FR ローカリゼーションの backgroundColor と signInPageText を更新する
次の要求は、ローカライズのバナー ロゴを fr-FR 更新します。
要求
要求の例を次に示します。
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"
}
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var organizationalBrandingLocalization = new OrganizationalBrandingLocalization
{
BackgroundColor = "#00000F",
SignInPageText = "Welcome to Contoso France"
};
await graphClient.Organization["{organization-id}"].Branding.Localizations["{organizationalBrandingLocalization-id}"]
.Request()
.UpdateAsync(organizationalBrandingLocalization);
SDK をプロジェクトに追加し、authProvider インスタンスを作成する 方法の詳細については、SDK のドキュメントを参照してください 。
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);
SDK をプロジェクトに追加し、authProvider インスタンスを作成する 方法の詳細については、SDK のドキュメントを参照してください 。
GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
OrganizationalBrandingLocalization organizationalBrandingLocalization = new OrganizationalBrandingLocalization();
organizationalBrandingLocalization.backgroundColor = "#00000F";
organizationalBrandingLocalization.signInPageText = "Welcome to Contoso France";
graphClient.organization("d69179bf-f4a4-41a9-a9de-249c0f2efb1d").branding().localizations("fr-FR")
.buildRequest()
.patch(organizationalBrandingLocalization);
SDK をプロジェクトに追加し、authProvider インスタンスを作成する 方法の詳細については、SDK のドキュメントを参照してください 。
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider];
NSString *MSGraphBaseURL = @"https://graph.microsoft.com/v1.0/";
NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/organization/d69179bf-f4a4-41a9-a9de-249c0f2efb1d/branding/localizations/fr-FR"]]];
[urlRequest setHTTPMethod:@"PATCH"];
[urlRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
MSGraphOrganizationalBrandingLocalization *organizationalBrandingLocalization = [[MSGraphOrganizationalBrandingLocalization alloc] init];
[organizationalBrandingLocalization setBackgroundColor:@"#00000F"];
[organizationalBrandingLocalization setSignInPageText:@"Welcome to Contoso France"];
NSError *error;
NSData *organizationalBrandingLocalizationData = [organizationalBrandingLocalization getSerializedDataWithError:&error];
[urlRequest setHTTPBody:organizationalBrandingLocalizationData];
MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
//Request Completed
}];
[meDataTask execute];
SDK をプロジェクトに追加し、authProvider インスタンスを作成する 方法の詳細については、SDK のドキュメントを参照してください 。
//THE GO SDK IS IN PREVIEW. NON-PRODUCTION USE ONLY
graphClient := msgraphsdk.NewGraphServiceClient(requestAdapter)
requestBody := msgraphsdk.NewOrganizationalBrandingLocalization()
backgroundColor := "#00000F"
requestBody.SetBackgroundColor(&backgroundColor)
signInPageText := "Welcome to Contoso France"
requestBody.SetSignInPageText(&signInPageText)
organizationId := "organization-id"
organizationalBrandingLocalizationId := "organizationalBrandingLocalization-id"
graphClient.OrganizationById(&organizationId).Branding().LocalizationsById(&organizationalBrandingLocalizationId).Patch(requestBody)
SDK をプロジェクトに追加し、authProvider インスタンスを作成する 方法の詳細については、SDK のドキュメントを参照してください 。
Import-Module Microsoft.Graph.Identity.DirectoryManagement
$params = @{
BackgroundColor = "#00000F"
SignInPageText = "Welcome to Contoso France"
}
Update-MgOrganizationBrandingLocalization -OrganizationId $organizationId -OrganizationalBrandingLocalizationId $organizationalBrandingLocalizationId -BodyParameter $params
SDK をプロジェクトに追加し、authProvider インスタンスを作成する 方法の詳細については、SDK のドキュメントを参照してください 。
応答
HTTP/1.1 204 No Content
例 3: 既定のブランド化値を空の文字列でオーバーライドする
要求
要求の例を次に示します。
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":" "
}
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var organizationalBrandingLocalization = new OrganizationalBrandingLocalization
{
SignInPageText = "Welcome to Contoso France.",
UsernameHintText = " "
};
await graphClient.Organization["{organization-id}"].Branding.Localizations["{organizationalBrandingLocalization-id}"]
.Request()
.UpdateAsync(organizationalBrandingLocalization);
SDK をプロジェクトに追加し、authProvider インスタンスを作成する 方法の詳細については、SDK のドキュメントを参照してください 。
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);
SDK をプロジェクトに追加し、authProvider インスタンスを作成する 方法の詳細については、SDK のドキュメントを参照してください 。
GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
OrganizationalBrandingLocalization organizationalBrandingLocalization = new OrganizationalBrandingLocalization();
organizationalBrandingLocalization.signInPageText = "Welcome to Contoso France.";
organizationalBrandingLocalization.usernameHintText = " ";
graphClient.organization("d69179bf-f4a4-41a9-a9de-249c0f2efb1d").branding().localizations("fr-FR")
.buildRequest()
.patch(organizationalBrandingLocalization);
SDK をプロジェクトに追加し、authProvider インスタンスを作成する 方法の詳細については、SDK のドキュメントを参照してください 。
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider];
NSString *MSGraphBaseURL = @"https://graph.microsoft.com/v1.0/";
NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/organization/d69179bf-f4a4-41a9-a9de-249c0f2efb1d/branding/localizations/fr-FR"]]];
[urlRequest setHTTPMethod:@"PATCH"];
[urlRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
MSGraphOrganizationalBrandingLocalization *organizationalBrandingLocalization = [[MSGraphOrganizationalBrandingLocalization alloc] init];
[organizationalBrandingLocalization setSignInPageText:@"Welcome to Contoso France."];
[organizationalBrandingLocalization setUsernameHintText:@" "];
NSError *error;
NSData *organizationalBrandingLocalizationData = [organizationalBrandingLocalization getSerializedDataWithError:&error];
[urlRequest setHTTPBody:organizationalBrandingLocalizationData];
MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
//Request Completed
}];
[meDataTask execute];
SDK をプロジェクトに追加し、authProvider インスタンスを作成する 方法の詳細については、SDK のドキュメントを参照してください 。
//THE GO SDK IS IN PREVIEW. NON-PRODUCTION USE ONLY
graphClient := msgraphsdk.NewGraphServiceClient(requestAdapter)
requestBody := msgraphsdk.NewOrganizationalBrandingLocalization()
signInPageText := "Welcome to Contoso France."
requestBody.SetSignInPageText(&signInPageText)
usernameHintText := " "
requestBody.SetUsernameHintText(&usernameHintText)
organizationId := "organization-id"
organizationalBrandingLocalizationId := "organizationalBrandingLocalization-id"
graphClient.OrganizationById(&organizationId).Branding().LocalizationsById(&organizationalBrandingLocalizationId).Patch(requestBody)
SDK をプロジェクトに追加し、authProvider インスタンスを作成する 方法の詳細については、SDK のドキュメントを参照してください 。
Import-Module Microsoft.Graph.Identity.DirectoryManagement
$params = @{
SignInPageText = "Welcome to Contoso France."
UsernameHintText = " "
}
Update-MgOrganizationBrandingLocalization -OrganizationId $organizationId -OrganizationalBrandingLocalizationId $organizationalBrandingLocalizationId -BodyParameter $params
SDK をプロジェクトに追加し、authProvider インスタンスを作成する 方法の詳細については、SDK のドキュメントを参照してください 。
応答
HTTP/1.1 204 No Content
この要求に従うと、ローカライズの fr-FR usernameHintText は、既定のブランド化オブジェクトから値を継承する代わりに空になります。