LearningCourseActivity を取得する
[アーティクル]
01/31/2024
7 人の共同作成者
フィードバック
この記事の内容
名前空間: microsoft.graph
学習プロバイダーの ID または externalCourseActivityId またはユーザーの courseActivityId を使用して、指定した learningCourseActivity オブジェクトを取得します。
この API は、次の国内クラウド展開 で使用できます。
グローバル サービス
米国政府機関 L4
米国政府機関 L5 (DOD)
21Vianet が運営する中国
✅
❌
❌
❌
アクセス許可
この API の最小特権としてマークされているアクセス許可またはアクセス許可を選択します。 アプリで必要な場合にのみ 、より高い特権のアクセス許可またはアクセス許可を使用します。 委任されたアクセス許可とアプリケーションのアクセス許可の詳細については、「 アクセス許可の種類 」を参照してください。 これらのアクセス許可の詳細については、 アクセス許可のリファレンスを参照してください 。
アクセス許可の種類
最小特権アクセス許可
特権の高いアクセス許可
委任 (職場または学校のアカウント)
LearningAssignedCourse.Read
LearningSelfInitiatedCourse.Read
委任 (個人用 Microsoft アカウント)
サポートされていません。
サポートされていません。
アプリケーション
LearningAssignedCourse.Read.All
LearningSelfInitiatedCourse.Read.All
HTTP 要求
ID (主キー) に基づいて特定のラーニング コース アクティビティを取得するには:
GET /employeeExperience/learningCourseActivities/{Id}
externalCourseActivityId (セカンダリ キー) に基づいて特定のラーニング コース アクティビティを取得するには:
GET /employeeExperience/learningProviders/{registrationId}/learningCourseActivities(externalCourseActivityId={externalCourseActivityId})
ユーザーのラーニング コース アクティビティの詳細を取得するには:
GET users/{user-id}/employeeExperience/learningCourseActivities/{id}
サインインしているユーザーのラーニング コース アクティビティの詳細を取得するには:
GET me/employeeExperience/learningCourseActivities/{id}
オプションのクエリ パラメーター
このメソッドは、 および 他の $select
OData クエリ パラメーターをサポートして、応答をカスタマイズします。 一般的な情報については、「OData クエリ パラメーター 」を参照してください。
名前
説明
Authorization
ベアラー {token}。 必須です。 認証と承認 の詳細については、こちらをご覧ください。
要求本文
このメソッドには、要求本文を指定しません。
応答
成功した場合、このメソッドは 200 OK
応答コードと、応答本文の learningCourseActivity オブジェクトを返します。
失敗した場合、このメソッドは次のいずれかの応答を返します。
シナリオ
HTTP コード
コード
メッセージ
エンティティではメソッドがサポートされていません
405
methodNotAllowed
このメソッドは、このエンティティ型ではサポートされていません。 このエンティティに適用されるメソッドについては、Microsoft Graph のドキュメントを参照してください。
ユーザーに適切なアクセス許可スコープがない
403
禁止されています
アカウントは、このレポートまたはデータにアクセスできません。 アクセスを要求するには、全体管理者に問い合わせてください。
禁止されています
403
禁止されています
この要求に対して適切なサービス プランがありません。
要求が正しくありません
400
badRequest
このプロバイダーは、特定のテナントに対して有効になっていません。
要求が正しくありません
400
badRequest
要求に問題が発生しました。 入力した registrationId がテナントに対して有効または登録されていることを確認します。
要求が正しくありません
404
notFound
要求された割り当て ID が存在しません。
内部サーバー エラー
500
internalServerError
内部サーバー エラー。
要求の調整
429
tooManyRequests
{"code": "tooManyRequests","message": "Retry after {noOfMinutes} minutes"}。
サービスを使用できません
503
serviceUnavailable
{"code": "serviceUnavailable","message": "Retry after {noOfMinutes} minutes"}。
例
例 1: ID に基づいて学習コース アクティビティを取得する
要求
次の例は、ID を使用して学習コース アクティビティを取得する要求を示しています。
GET https://graph.microsoft.com/v1.0/employeeExperience/learningCourseActivities/8ba2228a-e020-11ec-9d64-0242ac120003
// 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.EmployeeExperience.LearningCourseActivities["{learningCourseActivity-id}"].GetAsync();
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc employee-experience learning-course-activities get --learning-course-activity-id {learningCourseActivity-id}
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
//other-imports
)
graphClient := msgraphsdk.NewGraphServiceClientWithCredentials(cred, scopes)
learningCourseActivities, err := graphClient.EmployeeExperience().LearningCourseActivities().ByLearningCourseActivityId("learningCourseActivity-id").Get(context.Background(), nil)
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
LearningCourseActivity result = graphClient.employeeExperience().learningCourseActivities().byLearningCourseActivityId("{learningCourseActivity-id}").get();
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
const options = {
authProvider,
};
const client = Client.init(options);
let learningCourseActivity = await client.api('/employeeExperience/learningCourseActivities/8ba2228a-e020-11ec-9d64-0242ac120003')
.get();
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
<?php
use Microsoft\Graph\GraphServiceClient;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$result = $graphServiceClient->employeeExperience()->learningCourseActivities()->byLearningCourseActivityId('learningCourseActivity-id')->get()->wait();
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
from msgraph import GraphServiceClient
graph_client = GraphServiceClient(credentials, scopes)
result = await graph_client.employee_experience.learning_course_activities.by_learning_course_activity_id('learningCourseActivity-id').get()
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
応答
次の例は応答を示しています。
HTTP/1.1 200 OK
Content-Type: application/json
{
"@odata.type": "#microsoft.graph.learningAssignment",
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#learningProviders('13727311-e7bb-470d-8b20-6a23d9030d70')/learningCourseActivities('7ba2228a-e020-11ec-9d64-0242ac120002')$entity",
"assignedDateTime": "2021-05-11T22:57:17+00:00",
"assignmentType": "required",
"assignerUserId": "cea1684d-57dc-438d-a9d1-e666ec1a7f3d",
"completedDateTime": null,
"completionPercentage": null,
"dueDateTime": {
"dateTime": "2022-09-22T16:05:00.0000000",
"timeZone": "UTC"
},
"externalCourseActivityId": "12a2228a-e020-11ec-9d64-0242ac120002",
"id": "8ba2228a-e020-11ec-9d64-0242ac120003",
"learningContentId": "57baf9dc-e020-11ec-9d64-0242ac120002",
"learningProviderId": "13727311-e7bb-470d-8b20-6a23d9030d70",
"learnerUserId": "7ba2228a-e020-11ec-9d64-0242ac120002",
"notes": {
"contentType": "text",
"content": "required assignment added for user"
},
"status": "notStarted"
}
例 2: 学習プロバイダーの externalCourseActivityId に基づいて学習コースアクティビティを取得する
要求
次の例は、外部コース アクティビティ ID を使用して学習コース アクティビティの詳細を取得する要求を示しています。
GET https://graph.microsoft.com/v1.0/employeeExperience/learningProviders/01e8f81b-3060-4dec-acf0-0389665a0a38/learningCourseActivities(externalCourseActivityId=12a2228a-e020-11ec-9d64-0242ac120002)
// 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.EmployeeExperience.LearningProviders["{learningProvider-id}"].LearningCourseActivitiesWithExternalcourseActivityId("{externalcourseActivityId}").GetAsync();
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc employee-experience learning-providers learning-course-activities-with-externalcourse-activity-id get --externalcourse-activity-id {externalcourse-activity-id} --learning-provider-id {learningProvider-id}
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
//other-imports
)
graphClient := msgraphsdk.NewGraphServiceClientWithCredentials(cred, scopes)
externalcourseActivityId := "{externalcourseActivityId}"
learningCourseActivities, err := graphClient.EmployeeExperience().LearningProviders().ByLearningProviderId("learningProvider-id").LearningCourseActivitiesWithExternalcourseActivityId(&externalcourseActivityId).Get(context.Background(), nil)
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
LearningCourseActivity result = graphClient.employeeExperience().learningProviders().byLearningProviderId("{learningProvider-id}").learningCourseActivitiesWithExternalcourseActivityId("{externalcourseActivityId}").get();
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
<?php
use Microsoft\Graph\GraphServiceClient;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$result = $graphServiceClient->employeeExperience()->learningProviders()->byLearningProviderId('learningProvider-id')->learningCourseActivitiesWithExternalcourseActivityId('{externalcourseActivityId}', )->get()->wait();
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
from msgraph import GraphServiceClient
graph_client = GraphServiceClient(credentials, scopes)
result = await graph_client.employee_experience.learning_providers.by_learning_provider_id('learningProvider-id').learning_course_activities_with_externalcourse_activity_id("{externalcourseActivityId}").get()
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
応答
次の例は応答を示しています。
HTTP/1.1 200 OK
Content-Type: application/json
{
"@odata.type": "#microsoft.graph.learningAssignment",
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#learningProviders('01e8f81b-3060-4dec-acf0-0389665a0a38')/learningCourseActivities('8ba2228a-e020-11ec-9d64-0242ac120003')$entity",
"assignedDateTime": "2021-05-11T22:57:17+00:00",
"assignerUserId": "cea1684d-57dc-438d-a9d1-e666ec1a7f3d",
"assignmentType": "required",
"completedDateTime": null,
"completionPercentage": null,
"externalCourseActivityId": "12a2228a-e020-11ec-9d64-0242ac120002",
"id": "8ba2228a-e020-11ec-9d64-0242ac120003",
"dueDateTime": {
"dateTime": "2022-09-22T16:05:00.0000000",
"timeZone": "UTC"
},
"learningContentId": "57baf9dc-e020-11ec-9d64-0242ac120002",
"learningProviderId": "01e8f81b-3060-4dec-acf0-0389665a0a38",
"learnerUserId": "7ba2228a-e020-11ec-9d64-0242ac120002",
"notes": {
"contentType": "text",
"content": "required assignment added for user"
},
"status": "notStarted"
}
例 3: ユーザーのラーニング コース アクティビティの詳細を取得する
要求
次の例は、ユーザーのラーニング コース アクティビティの詳細を取得する要求を示しています。
GET https://graph.microsoft.com/v1.0/users/7ba2228a-e020-11ec-9d64-0242ac120002/employeeExperience/learningCourseActivities/8ba2228a-e020-11ec-9d64-0242ac120003
// 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.Users["{user-id}"].EmployeeExperience.LearningCourseActivities["{learningCourseActivity-id}"].GetAsync();
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc users employee-experience learning-course-activities get --user-id {user-id} --learning-course-activity-id {learningCourseActivity-id}
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
//other-imports
)
graphClient := msgraphsdk.NewGraphServiceClientWithCredentials(cred, scopes)
learningCourseActivities, err := graphClient.Users().ByUserId("user-id").EmployeeExperience().LearningCourseActivities().ByLearningCourseActivityId("learningCourseActivity-id").Get(context.Background(), nil)
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
LearningCourseActivity result = graphClient.users().byUserId("{user-id}").employeeExperience().learningCourseActivities().byLearningCourseActivityId("{learningCourseActivity-id}").get();
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
const options = {
authProvider,
};
const client = Client.init(options);
let learningCourseActivity = await client.api('/users/7ba2228a-e020-11ec-9d64-0242ac120002/employeeExperience/learningCourseActivities/8ba2228a-e020-11ec-9d64-0242ac120003')
.get();
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
<?php
use Microsoft\Graph\GraphServiceClient;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$result = $graphServiceClient->users()->byUserId('user-id')->employeeExperience()->learningCourseActivities()->byLearningCourseActivityId('learningCourseActivity-id')->get()->wait();
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
from msgraph import GraphServiceClient
graph_client = GraphServiceClient(credentials, scopes)
result = await graph_client.users.by_user_id('user-id').employee_experience.learning_course_activities.by_learning_course_activity_id('learningCourseActivity-id').get()
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
応答
次の例は応答を示しています。
HTTP/1.1 200 OK
Content-Type: application/json
{
"@odata.type": "#microsoft.graph.learningAssignment",
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#learningProviders('13727311-e7bb-470d-8b20-6a23d9030d70')/learningCourseActivities('8ba2228a-e020-11ec-9d64-0242ac120003')$entity",
"assignedDateTime": "2021-05-11T22:57:17+00:00",
"assignmentType": "required",
"assignerUserId": "cea1684d-57dc-438d-a9d1-e666ec1a7f3d",
"completedDateTime": null,
"completionPercentage": 20,
"externalCourseActivityId": "12a2228a-e020-11ec-9d64-0242ac120002",
"id": "8ba2228a-e020-11ec-9d64-0242ac120003",
"dueDateTime": {
"dateTime": "2022-09-22T16:05:00.0000000",
"timeZone": "UTC"
},
"learningContentId": "57baf9dc-e020-11ec-9d64-0242ac120002",
"learningProviderId": "13727311-e7bb-470d-8b20-6a23d9030d70",
"learnerUserId": "7ba2228a-e020-11ec-9d64-0242ac120002",
"notes": {
"contentType": "text",
"content": "required assignment added for user"
},
"status": "notStarted"
}