名前空間: microsoft.graph.identityGovernance
重要
Microsoft Graph の /beta バージョンの API は変更される可能性があります。 実稼働アプリケーションでこれらの API を使用することは、サポートされていません。 v1.0 で API を使用できるかどうかを確認するには、Version セレクターを使用します。
taskReport オブジェクトとそのプロパティの一覧を取得します。
この API は、次の国内クラウド展開で使用できます。
| グローバル サービス |
米国政府機関 L4 |
米国政府機関 L5 (DOD) |
21Vianet が運営する中国 |
| ✅ |
✅ |
✅ |
✅ |
アクセス許可
この API の最小特権としてマークされているアクセス許可またはアクセス許可を選択します。
アプリで必要な場合にのみ、より高い特権のアクセス許可またはアクセス許可を使用します。 委任されたアクセス許可とアプリケーションのアクセス許可の詳細については、「アクセス許可の種類」を参照してください。 これらのアクセス許可の詳細については、「アクセス許可のリファレンス」を参照してください。
| アクセス許可の種類 |
最小特権アクセス許可 |
より高い特権のアクセス許可 |
| 委任 (職場または学校のアカウント) |
LifecycleWorkflows-Reports.Read.All |
LifecycleWorkflows.Read.All、LifecycleWorkflows.ReadWrite.All |
| 委任 (個人用 Microsoft アカウント) |
サポートされていません。 |
サポートされていません。 |
| アプリケーション |
LifecycleWorkflows-Reports.Read.All |
LifecycleWorkflows.Read.All、LifecycleWorkflows.ReadWrite.All |
重要
職場または学校アカウントを使用した委任されたシナリオでは、サインインしているユーザーに、サポートされているMicrosoft Entraロールまたはサポートされているロールのアクセス許可を持つカスタム ロールを割り当てる必要があります。
グローバル 閲覧者 および ライフサイクル ワークフロー管理者 は、この操作でサポートされる最小限の特権ロールです。
HTTP 要求
GET /identityGovernance/lifecycleWorkflows/workflows/{workflowId}/taskReports
オプションのクエリ パラメーター
このメソッドは、応答をカスタマイズするための $select、$orderby、$expand、$filter OData クエリ パラメーターをサポートします。 一般的な情報については、「OData クエリ パラメーター」を参照してください。
| 名前 |
説明 |
| Authorization |
ベアラー {token}。 必須です。
認証と認可についての詳細をご覧ください。 |
要求本文
このメソッドには、要求本文を指定しません。
応答
成功した場合、このメソッドは 200 OK 応答コードと、応答本文の microsoft.graph.identityGovernance.taskReport オブジェクトのコレクションを返します。
例
例 1: ワークフローのタスク レポートを一覧表示する
要求
次の例は要求を示しています。
GET https://graph.microsoft.com/beta/identityGovernance/lifecycleWorkflows/workflows/14879e66-9ea9-48d0-804d-8fea672d0341/taskReports
// 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.IdentityGovernance.LifecycleWorkflows.Workflows["{workflow-id}"].TaskReports.GetAsync();
// Code snippets are only available for the latest major version. Current major version is $v0.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
//other-imports
)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
taskReports, err := graphClient.IdentityGovernance().LifecycleWorkflows().Workflows().ByWorkflowId("workflow-id").TaskReports().Get(context.Background(), nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.models.identitygovernance.TaskReportCollectionResponse result = graphClient.identityGovernance().lifecycleWorkflows().workflows().byWorkflowId("{workflow-id}").taskReports().get();
const options = {
authProvider,
};
const client = Client.init(options);
let taskReports = await client.api('/identityGovernance/lifecycleWorkflows/workflows/14879e66-9ea9-48d0-804d-8fea672d0341/taskReports')
.version('beta')
.get();
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$result = $graphServiceClient->identityGovernance()->lifecycleWorkflows()->workflows()->byWorkflowId('workflow-id')->taskReports()->get()->wait();
Import-Module Microsoft.Graph.Beta.Identity.Governance
Get-MgBetaIdentityGovernanceLifecycleWorkflowTaskReport -WorkflowId $workflowId
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
result = await graph_client.identity_governance.lifecycle_workflows.workflows.by_workflow_id('workflow-id').task_reports.get()
応答
次の例は応答を示しています。
注: ここに示す応答オブジェクトは、読みやすさのために短縮されている場合があります。
HTTP/1.1 200 OK
Content-Type: application/json
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#identityGovernance/lifecycleWorkflows/workflows('14879e66-9ea9-48d0-804d-8fea672d0341')/taskReports",
"@odata.count": 4,
"value": [
{
"id": "3a3bea11-99ca-462d-86fb-d283db8d734a",
"runId": "dad77a47-6eda-4de7-bc37-fe8eb5aaf17d",
"processingStatus": "completed",
"successfulUsersCount": 2,
"failedUsersCount": 0,
"unprocessedUsersCount": 0,
"totalUsersCount": 2,
"startedDateTime": "2022-08-24T23:28:04.5785337Z",
"completedDateTime": "2022-08-24T23:28:11.1348863Z",
"lastUpdatedDateTime": "2022-08-24T23:33:09.1980352Z"
},
{
"id": "23f37fcb-040d-4ee9-91df-1234700ebeb6",
"runId": "dad77a47-6eda-4de7-bc37-fe8eb5aaf17d",
"processingStatus": "completed",
"successfulUsersCount": 2,
"failedUsersCount": 0,
"unprocessedUsersCount": 0,
"totalUsersCount": 2,
"startedDateTime": "2022-08-24T23:28:04.5861287Z",
"completedDateTime": "2022-08-24T23:28:11.1348863Z",
"lastUpdatedDateTime": "2022-08-24T23:33:09.2051571Z"
},
{
"id": "462e6deb-a7b4-4777-a494-389c495862b8",
"runId": "a512bb50-3423-4bdc-ad5e-9731095b3b9a",
"processingStatus": "completed",
"successfulUsersCount": 2,
"failedUsersCount": 0,
"unprocessedUsersCount": 0,
"totalUsersCount": 2,
"startedDateTime": "2022-08-25T00:15:05.25581Z",
"completedDateTime": "2022-08-25T00:15:11.8535443Z",
"lastUpdatedDateTime": "2022-08-25T00:20:05.8759088Z"
},
{
"id": "e3dd0719-a50a-463d-b32d-7176fa4519e4",
"runId": "a512bb50-3423-4bdc-ad5e-9731095b3b9a",
"processingStatus": "completed",
"successfulUsersCount": 2,
"failedUsersCount": 0,
"unprocessedUsersCount": 0,
"totalUsersCount": 2,
"startedDateTime": "2022-08-25T00:15:05.2771389Z",
"completedDateTime": "2022-08-25T00:15:11.8535443Z",
"lastUpdatedDateTime": "2022-08-25T00:20:05.9002556Z"
}
]
}
例 2: ワークフローのタスク レポートを一覧表示する
要求
次の例は要求を示しています。
GET https://graph.microsoft.com/beta/identityGovernance/lifecycleWorkflows/workflows/15239232-66ed-445b-8292-2f5bbb2eb833/taskReports?$select=id,failedUsersCount,processingStatus,successfulUsersCount,totalUsersCount,unprocessedUsersCount,taskDefinition,taskProcessingResults
// 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.IdentityGovernance.LifecycleWorkflows.Workflows["{workflow-id}"].TaskReports.GetAsync((requestConfiguration) =>
{
requestConfiguration.QueryParameters.Select = new string []{ "id","failedUsersCount","processingStatus","successfulUsersCount","totalUsersCount","unprocessedUsersCount","taskDefinition","taskProcessingResults" };
});
// Code snippets are only available for the latest major version. Current major version is $v0.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
graphidentitygovernance "github.com/microsoftgraph/msgraph-beta-sdk-go/identitygovernance"
//other-imports
)
requestParameters := &graphidentitygovernance.LifecycleWorkflowsWorkflowsItemTaskReportsRequestBuilderGetQueryParameters{
Select: [] string {"id","failedUsersCount","processingStatus","successfulUsersCount","totalUsersCount","unprocessedUsersCount","taskDefinition","taskProcessingResults"},
}
configuration := &graphidentitygovernance.LifecycleWorkflowsWorkflowsItemTaskReportsRequestBuilderGetRequestConfiguration{
QueryParameters: requestParameters,
}
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
taskReports, err := graphClient.IdentityGovernance().LifecycleWorkflows().Workflows().ByWorkflowId("workflow-id").TaskReports().Get(context.Background(), configuration)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.models.identitygovernance.TaskReportCollectionResponse result = graphClient.identityGovernance().lifecycleWorkflows().workflows().byWorkflowId("{workflow-id}").taskReports().get(requestConfiguration -> {
requestConfiguration.queryParameters.select = new String []{"id", "failedUsersCount", "processingStatus", "successfulUsersCount", "totalUsersCount", "unprocessedUsersCount", "taskDefinition", "taskProcessingResults"};
});
const options = {
authProvider,
};
const client = Client.init(options);
let taskReports = await client.api('/identityGovernance/lifecycleWorkflows/workflows/15239232-66ed-445b-8292-2f5bbb2eb833/taskReports')
.version('beta')
.select('id,failedUsersCount,processingStatus,successfulUsersCount,totalUsersCount,unprocessedUsersCount,taskDefinition,taskProcessingResults')
.get();
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\IdentityGovernance\LifecycleWorkflows\Workflows\Item\TaskReports\TaskReportsRequestBuilderGetRequestConfiguration;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestConfiguration = new TaskReportsRequestBuilderGetRequestConfiguration();
$queryParameters = TaskReportsRequestBuilderGetRequestConfiguration::createQueryParameters();
$queryParameters->select = ["id","failedUsersCount","processingStatus","successfulUsersCount","totalUsersCount","unprocessedUsersCount","taskDefinition","taskProcessingResults"];
$requestConfiguration->queryParameters = $queryParameters;
$result = $graphServiceClient->identityGovernance()->lifecycleWorkflows()->workflows()->byWorkflowId('workflow-id')->taskReports()->get($requestConfiguration)->wait();
Import-Module Microsoft.Graph.Beta.Identity.Governance
Get-MgBetaIdentityGovernanceLifecycleWorkflowTaskReport -WorkflowId $workflowId -Property "id,failedUsersCount,processingStatus,successfulUsersCount,totalUsersCount,unprocessedUsersCount,taskDefinition,taskProcessingResults"
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.identity_governance.lifecycle_workflows.workflows.item.task_reports.task_reports_request_builder import TaskReportsRequestBuilder
from kiota_abstractions.base_request_configuration import RequestConfiguration
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
query_params = TaskReportsRequestBuilder.TaskReportsRequestBuilderGetQueryParameters(
select = ["id","failedUsersCount","processingStatus","successfulUsersCount","totalUsersCount","unprocessedUsersCount","taskDefinition","taskProcessingResults"],
)
request_configuration = RequestConfiguration(
query_parameters = query_params,
)
result = await graph_client.identity_governance.lifecycle_workflows.workflows.by_workflow_id('workflow-id').task_reports.get(request_configuration = request_configuration)
応答
次の例は応答を示しています。
注: ここに示す応答オブジェクトは、読みやすさのために短縮されている場合があります。
HTTP/1.1 200 OK
Content-Type: application/json
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#identityGovernance/lifecycleWorkflows/workflows('15239232-66ed-445b-8292-2f5bbb2eb833')/taskReports(id,failedUsersCount,processingStatus,successfulUsersCount,totalUsersCount,unprocessedUsersCount,taskDefinition,taskProcessingResults)",
"value": [
{
"id": "443c7611-45df-48c0-bf5e-dc6068c402f0",
"processingStatus": "completed",
"successfulUsersCount": 1,
"failedUsersCount": 0,
"unprocessedUsersCount": 0,
"totalUsersCount": 1
},
{
"id": "92bbb4a0-3815-48a7-8f83-f5dadc4f6793",
"processingStatus": "completed",
"successfulUsersCount": 1,
"failedUsersCount": 0,
"unprocessedUsersCount": 0,
"totalUsersCount": 1
},
{
"id": "d64d2b78-3823-4ec8-b6d3-efd3d41a5e98",
"processingStatus": "completed",
"successfulUsersCount": 1,
"failedUsersCount": 0,
"unprocessedUsersCount": 0,
"totalUsersCount": 1
}
]
}