Creating read only table results in "The first column is being used as primary key. It has to be a uid column"

I am trying to create a read only table by following the instructions on [1]. OI constantly is throwing an error windows stating that "The first column is being used as primary key. It has to be a uid column".

in My Query there is a first column that is suited ti be a primary key, but the error window is thrown nevertheless.

How do i have to form the query to satisfy the wizard?

[1]

support.oneidentity.com/.../99

  • Ok, found the reason. The first column has literally to be a UID Column of an underlying table. This wasn't necessary in former versions of OI.

  • Anonymous
    0 Anonymous in reply to Alexander Seidl

    Welcome to the age of AI well copilot helped me in this issue and it could get a hack for this issue using below finding

    One Identity Manager has a very strict interpretation of “UID column”

    It is not enough that:

    • the value is a GUID
    • the name begins with UID_

    OneIM requires that:

    White check mark **The UID column must be of type nvarchar(38) or char(38)

    AND must be explicitly cast to that format.**

    By default, NEWID() returns a uniqueidentifier type, which OneIM does not accept as a UID field in a view.

    sample query

    SELECT
    CAST(NEWID() AS CHAR(38)) AS UID_CCCCostCenter,
    CCC_CostCenter
    FROM (
    SELECT CCC_CostCenter
    FROM CCCSFEmployment
    WHERE ISNULL(CCC_CostCenter, '') <> ''

    UNION

    SELECT CCC_CostCenter
    FROM CCCSFPosition
    WHERE ISNULL(CCC_CostCenter, '') <> ''
    ) AS CC;