learningProvider の更新
[アーティクル]
04/21/2024
6 人の共同作成者
フィードバック
この記事の内容
名前空間: microsoft.graph
learningProvider オブジェクトのプロパティを更新します。
この API は、次の国内クラウド展開 で使用できます。
グローバル サービス
米国政府機関 L4
米国政府機関 L5 (DOD)
21Vianet が運営する中国
✅
❌
❌
❌
アクセス許可
この API の最小特権としてマークされているアクセス許可またはアクセス許可を選択します。 アプリで必要な場合にのみ 、より高い特権のアクセス許可またはアクセス許可を使用します。 委任されたアクセス許可とアプリケーションのアクセス許可の詳細については、「 アクセス許可の種類 」を参照してください。 これらのアクセス許可の詳細については、 アクセス許可のリファレンスを参照してください 。
アクセス許可の種類
最小特権アクセス許可
特権の高いアクセス許可
委任 (職場または学校のアカウント)
LearningProvider.ReadWrite
注意事項なし。
委任 (個人用 Microsoft アカウント)
サポートされていません。
サポートされていません。
アプリケーション
サポートされていません。
サポートされていません。
HTTP 要求
PATCH /employeeExperience/learningProviders/{learningProviderId}
名前
説明
Authorization
ベアラー {token}。 必須です。 認証と承認 の詳細については、こちらをご覧ください。
Content-Type
application/json. 必須です。
要求本文
要求本文で、更新すべきプロパティの値のみ を指定します。 要求本文に含まれていない既存のプロパティは、以前の値を維持するか、他のプロパティ値の変更に基づいて再計算されます。
次の表に、更新できるプロパティを示します。
プロパティ
型
説明
displayName
String
Viva Learningに表示される表示名。 必須です。
loginWebUrl
String
プロバイダーのコースにアクセスするための認証 URL。 省略可能です。
longLogoWebUrlForDarkTheme
String
パブリックにアクセス可能なイメージである必要があるダーク モードの長いロゴ URL。 このイメージは、Viva Learning アプリ内でレンダリングするためにViva Learningの BLOB ストレージに保存されます。 必須です。
longLogoWebUrlForLightTheme
String
パブリックにアクセス可能なイメージである必要があるライト モードの長いロゴ URL。 このイメージは、Viva Learning アプリ内でレンダリングするためにViva Learningの BLOB ストレージに保存されます。 必須です。
squareLogoWebUrlForDarkTheme
String
パブリックにアクセス可能なイメージである必要があるダーク モードの正方形のロゴ URL。 このイメージは、Viva Learning アプリ内でレンダリングするためにViva Learningの BLOB ストレージに保存されます。 必須です。
squareLogoWebUrlForLightTheme
String
パブリックにアクセス可能なイメージである必要があるライト モードの正方形のロゴ URL。 このイメージは、Viva Learning アプリ内でレンダリングするためにViva Learningの BLOB ストレージに保存されます。 必須です。
isCourseActivitySyncEnabled
ブール型
プロバイダーが learningCourseActivity を取り込めるかどうかを示します。 既定値は false
です。 このプロバイダーで learningCourseActivities を使用できるようにするには、 を に true
設定します。
応答
成功した場合、このメソッドは 204 No Content
応答本文で応答コードを返します。
例
要求
次の例は要求を示しています。
PATCH https://graph.microsoft.com/v1.0/employeeExperience/learningProviders/13727311-e7bb-470d-8b20-6a23d9030d70
Content-Type: application/json
{
"displayName": "Microsoft",
"squareLogoWebUrlForDarkTheme": "https://support.content.office.net/en-us/media/4c531d12-4c13-4782-a6e4-4b8f991801a3.png",
"longLogoWebUrlForDarkTheme": "https://support.content.office.net/en-us/media/4c531d12-4c13-4782-a6e4-4b8f991801a3.png",
"squareLogoWebUrlForLightTheme": "https://support.content.office.net/en-us/media/4c531d12-4c13-4782-a6e4-4b8f991801a3.png",
"longLogoWebUrlForLightTheme": "https://support.content.office.net/en-us/media/4c531d12-4c13-4782-a6e4-4b8f991801a3.png",
"loginWebUrl": "https://www.linkedin.com/learning-login/teams","isCourseActivitySyncEnabled": true
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new LearningProvider
{
DisplayName = "Microsoft",
SquareLogoWebUrlForDarkTheme = "https://support.content.office.net/en-us/media/4c531d12-4c13-4782-a6e4-4b8f991801a3.png",
LongLogoWebUrlForDarkTheme = "https://support.content.office.net/en-us/media/4c531d12-4c13-4782-a6e4-4b8f991801a3.png",
SquareLogoWebUrlForLightTheme = "https://support.content.office.net/en-us/media/4c531d12-4c13-4782-a6e4-4b8f991801a3.png",
LongLogoWebUrlForLightTheme = "https://support.content.office.net/en-us/media/4c531d12-4c13-4782-a6e4-4b8f991801a3.png",
LoginWebUrl = "https://www.linkedin.com/learning-login/teams",
IsCourseActivitySyncEnabled = true,
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.EmployeeExperience.LearningProviders["{learningProvider-id}"].PatchAsync(requestBody);
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc employee-experience learning-providers patch --learning-provider-id {learningProvider-id} --body '{\
"displayName": "Microsoft",\
"squareLogoWebUrlForDarkTheme": "https://support.content.office.net/en-us/media/4c531d12-4c13-4782-a6e4-4b8f991801a3.png",\
"longLogoWebUrlForDarkTheme": "https://support.content.office.net/en-us/media/4c531d12-4c13-4782-a6e4-4b8f991801a3.png",\
"squareLogoWebUrlForLightTheme": "https://support.content.office.net/en-us/media/4c531d12-4c13-4782-a6e4-4b8f991801a3.png",\
"longLogoWebUrlForLightTheme": "https://support.content.office.net/en-us/media/4c531d12-4c13-4782-a6e4-4b8f991801a3.png",\
"loginWebUrl": "https://www.linkedin.com/learning-login/teams","isCourseActivitySyncEnabled": true\
}\
'
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphmodels "github.com/microsoftgraph/msgraph-sdk-go/models"
//other-imports
)
graphClient := msgraphsdk.NewGraphServiceClientWithCredentials(cred, scopes)
requestBody := graphmodels.NewLearningProvider()
displayName := "Microsoft"
requestBody.SetDisplayName(&displayName)
squareLogoWebUrlForDarkTheme := "https://support.content.office.net/en-us/media/4c531d12-4c13-4782-a6e4-4b8f991801a3.png"
requestBody.SetSquareLogoWebUrlForDarkTheme(&squareLogoWebUrlForDarkTheme)
longLogoWebUrlForDarkTheme := "https://support.content.office.net/en-us/media/4c531d12-4c13-4782-a6e4-4b8f991801a3.png"
requestBody.SetLongLogoWebUrlForDarkTheme(&longLogoWebUrlForDarkTheme)
squareLogoWebUrlForLightTheme := "https://support.content.office.net/en-us/media/4c531d12-4c13-4782-a6e4-4b8f991801a3.png"
requestBody.SetSquareLogoWebUrlForLightTheme(&squareLogoWebUrlForLightTheme)
longLogoWebUrlForLightTheme := "https://support.content.office.net/en-us/media/4c531d12-4c13-4782-a6e4-4b8f991801a3.png"
requestBody.SetLongLogoWebUrlForLightTheme(&longLogoWebUrlForLightTheme)
loginWebUrl := "https://www.linkedin.com/learning-login/teams"
requestBody.SetLoginWebUrl(&loginWebUrl)
isCourseActivitySyncEnabled := true
requestBody.SetIsCourseActivitySyncEnabled(&isCourseActivitySyncEnabled)
learningProviders, err := graphClient.EmployeeExperience().LearningProviders().ByLearningProviderId("learningProvider-id").Patch(context.Background(), requestBody, nil)
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
LearningProvider learningProvider = new LearningProvider();
learningProvider.setDisplayName("Microsoft");
learningProvider.setSquareLogoWebUrlForDarkTheme("https://support.content.office.net/en-us/media/4c531d12-4c13-4782-a6e4-4b8f991801a3.png");
learningProvider.setLongLogoWebUrlForDarkTheme("https://support.content.office.net/en-us/media/4c531d12-4c13-4782-a6e4-4b8f991801a3.png");
learningProvider.setSquareLogoWebUrlForLightTheme("https://support.content.office.net/en-us/media/4c531d12-4c13-4782-a6e4-4b8f991801a3.png");
learningProvider.setLongLogoWebUrlForLightTheme("https://support.content.office.net/en-us/media/4c531d12-4c13-4782-a6e4-4b8f991801a3.png");
learningProvider.setLoginWebUrl("https://www.linkedin.com/learning-login/teams");
learningProvider.setIsCourseActivitySyncEnabled(true);
LearningProvider result = graphClient.employeeExperience().learningProviders().byLearningProviderId("{learningProvider-id}").patch(learningProvider);
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
const options = {
authProvider,
};
const client = Client.init(options);
const learningProvider = {
displayName: 'Microsoft',
squareLogoWebUrlForDarkTheme: 'https://support.content.office.net/en-us/media/4c531d12-4c13-4782-a6e4-4b8f991801a3.png',
longLogoWebUrlForDarkTheme: 'https://support.content.office.net/en-us/media/4c531d12-4c13-4782-a6e4-4b8f991801a3.png',
squareLogoWebUrlForLightTheme: 'https://support.content.office.net/en-us/media/4c531d12-4c13-4782-a6e4-4b8f991801a3.png',
longLogoWebUrlForLightTheme: 'https://support.content.office.net/en-us/media/4c531d12-4c13-4782-a6e4-4b8f991801a3.png',
loginWebUrl: 'https://www.linkedin.com/learning-login/teams',isCourseActivitySyncEnabled: true
};
await client.api('/employeeExperience/learningProviders/13727311-e7bb-470d-8b20-6a23d9030d70')
.update(learningProvider);
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\LearningProvider;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new LearningProvider();
$requestBody->setDisplayName('Microsoft');
$requestBody->setSquareLogoWebUrlForDarkTheme('https://support.content.office.net/en-us/media/4c531d12-4c13-4782-a6e4-4b8f991801a3.png');
$requestBody->setLongLogoWebUrlForDarkTheme('https://support.content.office.net/en-us/media/4c531d12-4c13-4782-a6e4-4b8f991801a3.png');
$requestBody->setSquareLogoWebUrlForLightTheme('https://support.content.office.net/en-us/media/4c531d12-4c13-4782-a6e4-4b8f991801a3.png');
$requestBody->setLongLogoWebUrlForLightTheme('https://support.content.office.net/en-us/media/4c531d12-4c13-4782-a6e4-4b8f991801a3.png');
$requestBody->setLoginWebUrl('https://www.linkedin.com/learning-login/teams');
$requestBody->setIsCourseActivitySyncEnabled(true);
$result = $graphServiceClient->employeeExperience()->learningProviders()->byLearningProviderId('learningProvider-id')->patch($requestBody)->wait();
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
from msgraph import GraphServiceClient
from msgraph.generated.models.learning_provider import LearningProvider
graph_client = GraphServiceClient(credentials, scopes)
request_body = LearningProvider(
display_name = "Microsoft",
square_logo_web_url_for_dark_theme = "https://support.content.office.net/en-us/media/4c531d12-4c13-4782-a6e4-4b8f991801a3.png",
long_logo_web_url_for_dark_theme = "https://support.content.office.net/en-us/media/4c531d12-4c13-4782-a6e4-4b8f991801a3.png",
square_logo_web_url_for_light_theme = "https://support.content.office.net/en-us/media/4c531d12-4c13-4782-a6e4-4b8f991801a3.png",
long_logo_web_url_for_light_theme = "https://support.content.office.net/en-us/media/4c531d12-4c13-4782-a6e4-4b8f991801a3.png",
login_web_url = "https://www.linkedin.com/learning-login/teams",
is_course_activity_sync_enabled = True,
)
result = await graph_client.employee_experience.learning_providers.by_learning_provider_id('learningProvider-id').patch(request_body)
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
応答
次の例は応答を示しています。
HTTP/1.1 204 No Content