---
title: "Get Latest Custom Analysis Result"
method: GET
path: "/api/v1/role-mining/custom-analysis/latest"
tags: ["Role Mining"]
---

# Get Latest Custom Analysis Result

`GET /api/v1/role-mining/custom-analysis/latest`

## Request

- Base URL: `https://example.conductor.one`
- URL: `https://example.conductor.one/api/v1/role-mining/custom-analysis/latest`
- Auth: HTTP bearer and OAuth 2
  - Client credentials
  - Token URL: `/auth/v1/token`

GetLatestCustomAnalysisResult returns the authenticated user's latest
 accepted custom analysis result, if one exists.

## Response `200`

Successful response

- C1ApiRoleMiningManagementV1GetLatestCustomAnalysisResultResponse: The GetLatestCustomAnalysisResultResponse message.
  - `result` C1ApiRoleMiningManagementV1CustomAnalysisResultView: CustomAnalysisResultView is a lightweight summary of a past custom analysis run.
    - `accessScope` C1McpRoleMiningV1AccessScope: AccessScope narrows a cohort to the users who hold a grant. It is combined with any ProfileFilters using AND logic, and is a complete cohort definition on its own. This message contains a oneof named scope. Only a single field of the following list may be set at a time: - appId - entitlement
      - `appId` string, nullable: Cohort is every user holding a grant to this app's built-in Access entitlement, which is how "everyone with access to the app" is stored. This field is part of the `scope` oneof. See the documentation for `c1.mcp.role_mining.v1.AccessScope` for more details.
      - `entitlement` C1McpRoleMiningV1AppEntitlementScopeRef: AppEntitlementScopeRef identifies one entitlement by app and entitlement ID.
        - `appId` string: The appId field.
        - `entitlementId` string: The entitlementId field.
    - `cohortSize` integer: Number of users in the cohort.
    - `completedAt` string, date-time, nullable
    - `createdAt` string, date-time, nullable
    - `createdByUserId` string: User who created this analysis, empty for legacy results.
    - `errorMessage` string: Error message if the analysis failed, empty on success.
    - `id` string: Unique identifier for this custom analysis result.
    - `profileFilters` C1McpRoleMiningV1ProfileFilter[], nullable: Profile filters that defined the cohort for this analysis.
      - `attribute` string: The attribute field.
      - `values` string[], nullable: The values field.
    - `resourceScope` C1McpRoleMiningV1ResourceScope: ResourceScope narrows which entitlements an analysis considers, without changing the cohort. Coverage denominators stay the population the ProfileFilters and AccessScope select; only the entitlement universe shrinks. It is never a cohort definition on its own.
      - `appIds` string[], nullable: The appIds field.
    - `status` 'RUN_STATUS_UNSPECIFIED' | 'RUN_STATUS_RUNNING' | 'RUN_STATUS_COMPLETED' | 'RUN_STATUS_FAILED': Execution status of this analysis (e.g., running, completed, failed).
    - `suggestionsGenerated` integer: Number of role suggestions generated.
    - `supersededByResultId` string: Newer result that superseded this analysis, when applicable.
    - `terminalReason` 'CUSTOM_ANALYSIS_TERMINAL_REASON_UNSPECIFIED' | 'CUSTOM_ANALYSIS_TERMINAL_REASON_ERROR' | 'CUSTOM_ANALYSIS_TERMINAL_REASON_SUPERSEDED': Structured terminal reason, unspecified for legacy results.

## Changes

- **2026-10-06** `918a4e749f56`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/conductorone/apis/c1-api/changes/api/v1/role-mining/custom-analysis/latest/get.md)

---

[API](https://skmtc.dev/conductorone/apis/c1-api.md) - [All operations](https://skmtc.dev/conductorone/apis/c1-api/llms.txt) - [OpenAPI document](https://skmtc.dev/conductorone/apis/c1-api/revisions/fe943bedf41b?raw)
