Blogs

Retrieving Role, Duty Role, and Privileges Navigation Path in Oracle Fusion BI Report with SQL Query

Oracle Fusion BI Report with SQL Query

The following Oracle Fusion SQL query enables administrators and auditors to retrieve the complete hierarchy of Job Roles, Duty Roles, and associated Privileges, along with the navigation path that defines their interrelationships.

This query is particularly useful in Oracle Fusion BI Reports to analyze access governance, track inherited security relationships, and ensure compliance with internal control frameworks.

SQL Query

SELECT DISTINCT 

    “C”.”Job Role id”,

    “C”.”Job Role Name”,

    “C”.”Duty Role id”,

    (SELECT “ASE_ROLE_VL”.”ROLE_NAME” 

     FROM “FUSION”.”ASE_ROLE_VL” “ASE_ROLE_VL” 

     WHERE “ASE_ROLE_VL”.”ROLE_ID” = “C”.”Duty Role id”) AS “Duty Role Name”,

    “ASE_PRIV_ROLE_MBR”.”PRIVILEGE_ID” AS “PRIVILEGE_ID”,

    (SELECT “ASE_PRIVILEGE_VL”.”NAME” 

     FROM “FUSION”.”ASE_PRIVILEGE_VL” “ASE_PRIVILEGE_VL” 

     WHERE “ASE_PRIVILEGE_VL”.”PRIVILEGE_ID” = “ASE_PRIV_ROLE_MBR”.”PRIVILEGE_ID”) AS “Privilege_name”,

    “C”.”Navigation path”

FROM (

    SELECT 

        “B”.”Job_Role_id1″ AS “Job Role id”,

        (SELECT “ASE_ROLE_VL”.”ROLE_NAME” 

         FROM “FUSION”.”ASE_ROLE_VL” “ASE_ROLE_VL” 

         WHERE “ASE_ROLE_VL”.”ROLE_ID” = “B”.”Job_Role_id1″) AS “Job Role Name”,

        “B”.”Duty_Role_id1″ AS “Duty Role id”,

        “B”.”Navigation_path1″ AS “Navigation path”

    FROM (

        SELECT 

            “A”.”Job_Role_id” AS “Job_Role_id1”,

            “A”.”Duty_Role_id” AS “Duty_Role_id1”,

            (SELECT “ASE_ROLE_TYPE_VL”.”ROLE_TYPE_NAME”

             FROM “FUSION”.”ASE_ROLE_TYPE_VL” “ASE_ROLE_TYPE_VL”

             WHERE “ASE_ROLE_TYPE_VL”.”ROLE_TYPE_CODE” = 

                 (SELECT “ASE_ROLE_VL”.”ROLE_TYPE_CODE”

                  FROM “FUSION”.”ASE_ROLE_VL” “ASE_ROLE_VL”

                  WHERE “ASE_ROLE_VL”.”ROLE_ID” = “A”.”Job_Role_id”)) AS “JOB_ROLE_TYPE_NAME”,

            (SELECT “ASE_ROLE_TYPE_VL”.”ROLE_TYPE_NAME”

             FROM “FUSION”.”ASE_ROLE_TYPE_VL” “ASE_ROLE_TYPE_VL”

             WHERE “ASE_ROLE_TYPE_VL”.”ROLE_TYPE_CODE” = 

                 (SELECT “ASE_ROLE_VL”.”ROLE_TYPE_CODE”

                  FROM “FUSION”.”ASE_ROLE_VL” “ASE_ROLE_VL”

                  WHERE “ASE_ROLE_VL”.”ROLE_ID” = “A”.”Duty_Role_id”)) AS “DUTY_ROLE_TYPE_NAME”,

            “A”.”Navigation_path” AS “Navigation_path1”

        FROM (

            (SELECT DISTINCT 

                CONNECT_BY_ROOT “ASE_ROLE_ROLE_MBR”.”CHILD_ROLE_ID” AS “Job_Role_id”,

                “ASE_ROLE_ROLE_MBR”.”PARENT_ROLE_ID” AS “Duty_Role_id”,

                SYS_CONNECT_BY_PATH(

                    (SELECT “ASE_ROLE_VL”.”ROLE_NAME”

                     FROM “FUSION”.”ASE_ROLE_VL” “ASE_ROLE_VL”

                     WHERE “ASE_ROLE_VL”.”ROLE_ID” = “ASE_ROLE_ROLE_MBR”.”PARENT_ROLE_ID”), 

                ‘ -> ‘) AS “Navigation_path”

            FROM “FUSION”.”ASE_ROLE_ROLE_MBR” “ASE_ROLE_ROLE_MBR”

            WHERE (“ASE_ROLE_ROLE_MBR”.”EFFECTIVE_END_DATE” >= SYSDATE 

                   OR “ASE_ROLE_ROLE_MBR”.”EFFECTIVE_END_DATE” IS NULL)

            CONNECT BY PRIOR “ASE_ROLE_ROLE_MBR”.”PARENT_ROLE_ID” = “ASE_ROLE_ROLE_MBR”.”CHILD_ROLE_ID”)

            UNION

            (SELECT 

                “ASE_ROLE_VL”.”ROLE_ID” AS “Job_Role_id”,

                “ASE_ROLE_VL”.”ROLE_ID” AS “Duty_Role_id”,

                ‘ -> ‘ || “ASE_ROLE_VL”.”ROLE_NAME” AS “Navigation_path”

             FROM “FUSION”.”ASE_ROLE_VL” “ASE_ROLE_VL”

             WHERE (“ASE_ROLE_VL”.”EFFECTIVE_END_DATE” >= SYSDATE 

                    OR “ASE_ROLE_VL”.”EFFECTIVE_END_DATE” IS NULL))

        ) “A”

    ) “B”

    WHERE (“B”.”JOB_ROLE_TYPE_NAME” LIKE ‘%Duty Roles%’ 

        OR “B”.”DUTY_ROLE_TYPE_NAME” LIKE ‘%Duty Roles%’)

) “C”,

“FUSION”.”ASE_PRIV_ROLE_MBR” “ASE_PRIV_ROLE_MBR”

WHERE “ASE_PRIV_ROLE_MBR”.”ROLE_ID” = “C”.”Duty Role id”

AND UPPER(“C”.”Job Role Name”) LIKE UPPER(:P_NAME);

Query Overview

This SQL query performs a recursive traversal of Oracle Fusion’s role hierarchy to extract:

  • Job Role → Duty Role → Privilege relationships
  • Navigation path illustrating how roles inherit privileges through multiple levels
  • Effective role hierarchy based on EFFECTIVE_END_DATE conditions

It joins core Oracle Fusion security tables such as:

  • ASE_ROLE_ROLE_MBR: Stores parent-child role relationships.
  • ASE_ROLE_VL: Contains role details and type codes.
  • ASE_PRIV_ROLE_MBR: Links roles to their corresponding privileges.
  • ASE_PRIVILEGE_VL: Provides privilege names and metadata.

Business Use Case

This query is invaluable for:

  • Access Governance: Understanding how privileges flow from job roles down to individual duty roles.
  • SoD Analysis (Segregation of Duties): Identifying where privilege overlaps may cause conflicts.
  • Compliance and Audit: Providing detailed lineage of access entitlements.
  • Security Model Reviews: Visualizing navigation paths between job roles, duty roles, and privileges for validation or redesign.

Organizations using this query can enhance their visibility into user role composition, simplify security audits, and strengthen access governance across Oracle Fusion Cloud applications.

Frequently Asked Questions

Q1.What topics does the SQLGuru.ai blog cover?

The SQLGuru.ai blog explores how AI is transforming SQL generation, data analytics, and license management for enterprises. From simplifying complex queries to optimizing ERP performance and tracking software usage, we share actionable insights to help both data teams and business users work smarter.

Our blog helps organizations make smarter decisions around access control, audit readiness, and governance strategy. You’ll gain actionable knowledge to improve your security posture, reduce compliance risk, and streamline operations across ERP systems.

The SQLGuru.ai blog is designed for data analysts, BI teams, IT leaders, and finance professionals who want to harness AI to improve data accessibility, compliance, and license cost optimization. It’s ideal for anyone bridging technical and business operations through smarter, AI-driven insights.

Share the Post:

Recent Blogs

Welcome to the 1Trooper Blog — your space for insights, updates, and ideas on digital growth. Here we share strategies, tips, and stories to help brands thrive in today’s fast-paced digital world.

Identity Access Management Cloud: The Corporate Armour for Modern Enterprises

In a world where cyber threats evolve faster than ever, protecting your....

Comprehensive Identity and Access Management in the Cloud

As organizations accelerate their journey toward digital transformation, maintaining secure and compliant....

Identity and Access Management Compliance and Intelligent Analytics

In an era where digital transformation defines organizational competitiveness, Identity and Access....

Real-World Governance and Cost-Effectiveness: Striking the Balance Between Compliance and Risk Management

In today’s rapidly evolving regulatory landscape, organizations across industries are under increasing....