---
title: "UniverseDataModel"
description: "Creates, within a universe, entity instances and association instances based on a predefined template."
sidebar_position: 2
---

This scaffolding creates, within a universe, entity instances and association instances based on a predefined template.

The entity instances generated by the scaffolding will have:
* as a display name, the display name of the corresponding navigation property, for example `Main Record`;
* as an identifier, the identifier of the corresponding navigation which is made of `<EntityType_Id>_<Property_Id>`, for example `Directory_User_MainRecord`.


## Properties

|Property|Details|
|---|---|
| EntityType required | **Type:** String **Description:** Identifier of the entity type that we want to represent in the universe (as an entity instance) with all its navigations. |
| Universe required | **Type:** String **Description:** Identifier of the universe in which the instances to be generated are going to exist. |



## Child Elements
* [ExcludedProperty](#excludedproperty) (optional) to ignore a given property of the specified entity type.
* [RootInstance](#rootinstance) (optional) to rename the core entity instance that is to be generated, and to avoid data duplication when using several scaffoldings in one universe.
* [SourceEntityType](#sourceentitytype) (optional) Define the source EntityType
* [UniverseTemplate](#universetemplate) (optional) to use a template different from the default one.

### ExcludedProperty


|Property|Details|
|---|---|
| Property required | **Type:** String **Description:** Property of the specified entity type that is to be ignored for the generation of entity instances and association instances. |



:::info
A scaffolding doesn't use filters, but a part of the entity model can be excluded with the `ExcludedProperty` argument.
:::

The following example generates a universe `U8_Users` based on the entity type `Directory_User`, like our U1 but without the `Guests` property:

```xml
<Universe Identifier="U8_Users" DisplayName_L1="U8 - Users" ColumnNamesMode="Identifier" />
<UniverseDataModel Universe="U8_Users" EntityType="Directory_User" >
    <ExcludedProperty Property="Guests"/>
</UniverseDataModel>
```

When [getting Identity Manager data in Power BI](../../../../../../admin/governance/reporting/how-tos/connect-powerbi.md), the following appears:
![Universe (ExcludedProperty)](/images/identitymanager/universe_excluded.webp)

### RootInstance


|Property|Details|
|---|---|
| Instance required | **Type:** String **Description:** Identifier of the entity instance generated based on the EntityType property of the universe scaffolding. If not specified, the identifier of the entity instance is the identifier of the entity type. |

The following example generates a universe `U2_UserRecords` based on the entity type `Directory_UserRecord`, naming the entity instance `REC`:

```xml
<Universe Identifier="U2_UserRecords" DisplayName_L1="U2 - User Records" ColumnNamesMode="Identifier" />
<UniverseDataModel Universe="U2_UserRecords" EntityType="Directory_UserRecord" >
    <RootInstance Instance="REC" />
</UniverseDataModel>
```

![Universe (RootInstance)](/images/identitymanager/Universe_rootInstance.webp)

When [getting Identity Manager data in Power BI](../../../../../../admin/governance/reporting/how-tos/connect-powerbi.md), the following appears:
![Universe (RootInstance)](/images/identitymanager/Universe_rootInstance.webp)

#### RootInstance for several scaffoldings together

:::info
A universe can be made of several scaffoldings which need to be grouped together a specific way. One universe made of two scaffoldings will generate the two entity instances corresponding to the two specified entity types, with the entity and association instances corresponding to their navigation properties. To avoid data duplication in the universe model, we use `RootInstance` to rename one of the entity instances and follow the existing naming rule explained in the introduction.
:::


```xml
&lt;Universe Identifier="U3_UserRecords" DisplayName_L1="U3 - User Records" ColumnNamesMode="Identifier" /&gt;
&lt;UniverseDataModel Universe="U3_UserRecords" EntityType="Directory_User" /&gt;
&lt;UniverseDataModel Universe="U3_UserRecords" EntityType="Directory_UserRecord" /&gt;
```

![Universe Schema (Several Scaffoldings with Data Duplication)](/images/identitymanager/Universe_severalDuplicationSchema.webp)

When [getting Identity Manager data in Power BI](../../../../../../admin/governance/reporting/how-tos/connect-powerbi.md), the following appears:
![Universe (Several Scaffoldings with Data Duplication)](/images/identitymanager/Universe_severalDuplication.webp)
We see that `Directory_User_Records` and `Directory_UserRecords` represent the same entity instances.

**The following example** generates a better version of the universe `U3_UserRecords` based on the entity types `Directory_User` and `Directory_UserRecord`, renaming `Directory_UserRecord` as `Directory_User_Records` to follow the naming rule, thus building the universe model with `Directory_User` as the core entity instance:

```xml
&lt;Universe Identifier="U3_UserRecords" DisplayName_L1="U3 - User Records" ColumnNamesMode="Identifier" /&gt;
&lt;UniverseDataModel Universe="U3_UserRecords" EntityType="Directory_User" /&gt;
&lt;UniverseDataModel Universe="U3_UserRecords" EntityType="Directory_UserRecord" &gt;
    <b>&lt;RootInstance Instance="Directory_User_Records" /&gt;</b>
&lt;/UniverseDataModel&gt;
```

![Universe (Several Scaffoldings without Data Duplication)](/images/identitymanager/Universe_severalNoDuplicationSchema.webp)

When [getting Identity Manager data in Power BI](../../../../../../admin/governance/reporting/how-tos/connect-powerbi.md), the following appears:
![Universe (Several Scaffoldings without Data Duplication)](/images/identitymanager/Universe_severalNoDuplication.webp)
Thus we removed the duplicated data, and we understand easily the navigations of the model.

### SourceEntityType


|Property|Details|
|---|---|
| Identifier optional | **Type:** String **Description:** The identifier's SourceEntityType |



### UniverseTemplate


|Property|Details|
|---|---|
| Template required | **Type:** String **Description:** Represents the argument value. |

#### Default Template

When no template is specified, the scaffolding generates:
* an entity instance based on a given entity type;
* an association instance and an entity instance for each navigation property of the entity type.

**The following example** generates a universe `U1_Users` based on the entity type `Directory_User`:

```xml
<Universe Identifier="U1_Users" DisplayName_L1="U1 - Users" ColumnNamesMode="Identifier" />
<UniverseDataModel Universe="U1_Users" EntityType="Directory_User" />
```

It generates:

```xml
<Universe Identifier="U1_Users" DisplayName_L1="U1 - Users" ColumnNamesMode="Identifier" >

  One entity instance for the entity type Directory_User:
  <EntityInstance Identifier="Directory_User" DisplayName_L1="User" EntityType="Directory_User" />

  One association instance and one entity instance per navigation property:
  <AssociationInstance Association="Directory_User_MainCountry" Instance1="Directory_User" Instance2="Directory_User_MainCountry" Direction="From1To2" />
  <EntityInstance Identifier="Directory_User_MainCountry" DisplayName_L1="Main Country" EntityType="Directory_Country" />
  ...

</Universe>
```

![Universe (No Template)](/images/identitymanager/universe_notemplateschema.webp)

When [getting Identity Manager data in Power BI](../../../../../../admin/governance/reporting/how-tos/connect-powerbi.md), the following appears:
![Universe (No Template)](/images/identitymanager/Universe_noTemplate.webp)

:::info
We see here identifiers instead of display names due to `ColumnNamesMode` set to identifiers.
:::

#### OwnedResourceTypes

The following example generates a universe `U4_User` based on the entity type `Directory_User` and the resources assigned to users:

```xml
&lt;Universe Identifier="U4_User" DisplayName_L1="U4 - User" ColumnNamesMode="Identifier"/&gt;
&lt;UniverseDataModel Universe="U4_User" EntityType="Directory_User"&gt;
    <b>&lt;UniverseTemplate Template="OwnedResourceTypes"/&gt;</b>
&lt;/UniverseDataModel&gt;
```

It generates:

```xml
&lt;Universe Identifier="U4_User" DisplayName_L1="U4 - User" ColumnNamesMode="Identifier"&gt;

  <em>One entity instance for the entity type Directory_User.</em>
  &lt;EntityInstance Identifier="Directory_User" DisplayName_L1="User" EntityType="Directory_User" /&gt;

  <em>Association instances and entity instances about the AD_Entry_NominativeUser resource type:</em>

  &lt;EntityInstance Identifier="Directory_User_OwnedAssignedResourceTypes_AD_Entry_NominativeUser" DisplayName_L1="Assigned AD User (nominative)" EntityType="AssignedResourceType" FilterProperty="RoleId" FilterResourceType="AD_Entry_NominativeUser" /&gt;
  &lt;EntityInstance Identifier="Directory_User_OwnedAssignedResourceTypes_AD_Entry_NominativeUser_Resource" DisplayName_L1="AD User (nominative)" EntityType="AD_Entry" /&gt;

  &lt;AssociationInstance Association="AssignedResourceType.Resource" Direction="From1To2" Instance1="Directory_User_OwnedAssignedResourceTypes_AD_Entry_NominativeUser" Instance2="Directory_User_OwnedAssignedResourceTypes_AD_Entry_NominativeUser_Resource" /&gt;
  &lt;AssociationInstance Association="AssignedResourceType.Owner" Direction="From2To1" Instance1="Directory_User_OwnedAssignedResourceTypes_AD_Entry_NominativeUser" Instance2="Directory_User" /&gt;

  <em>Same for all resource types.</em>
  ...

&lt;/Universe&gt;
```

![Universe (Template Schema: Owned Resource Types)](/images/identitymanager/Universe_OwnedResourceTypesSchema.webp)

When [getting Identity Manager data in Power BI](../../../../../../admin/governance/reporting/how-tos/connect-powerbi.md), the following appears:
![Universe (Template: Owned Resource Types)](/images/identitymanager/Universe_OwnedResourceTypes.webp)

#### ResourceResourceTypes

The following example generates a universe `U5_AD` based on the entity type `AD_Entry` and the owners of AD resources:

```xml
&lt;Universe Identifier="U5_AD" DisplayName_L1="U5 AD" ColumnNamesMode="Identifier"/&gt;
&lt;UniverseDataModel Universe="U5_AD" EntityType="AD_Entry"&gt;
    <b>&lt;UniverseTemplate Template="ResourceResourceTypes"/&gt;</b>
&lt;/UniverseDataModel&gt;
```

The configuration generated by this snippet is similar to the one for `OwnedResourceTypes`.

![Universe (Template Schema: Resource Resource Types)](/images/identitymanager/Universe_ResourceResourceTypesSchema.webp)

When [getting Identity Manager data in Power BI](../../../../../../admin/governance/reporting/how-tos/connect-powerbi.md), the following appears:
![Universe (Template: Resource Resource Types)](/images/identitymanager/Universe_ResourceResourceTypes.webp)

#### OwnedSingleRoles

The following example generates a universe `U6_User` based on the entity type `Directory_User` and the single roles assigned to users:

```xml
&lt;Universe Identifier="U6_User" DisplayName_L1="U6 - User" ColumnNamesMode="Identifier"/&gt;
&lt;UniverseDataModel Universe="U6_User" EntityType="Directory_User"&gt;
    <b>&lt;UniverseTemplate Template="OwnedSingleRoles"/&gt;</b>
&lt;/UniverseDataModel&gt;
```

It generates:

```xml
&lt;Universe Identifier="U6_User" DisplayName_L1="U6 - User" ColumnNamesMode="Identifier"&gt;

  <em>One entity instance for the entity type Directory_User.</em>
  &lt;EntityInstance Identifier="Directory_User" DisplayName_L1="User" EntityType="Directory_User" /&gt;

  <em>One entity instance containing data about role assignments, and one association instance linking it to Directory_User:</em>
  &lt;EntityInstance Identifier="Directory_User_OwnedAssignedSingleRoles" DisplayName_L1="Assigned Bundles" EntityType="AssignedSingleRole" /&gt;
  &lt;AssociationInstance Association="AssignedSingleRole.Owner" Direction="From1To2" Instance1="Directory_User" Instance2="Directory_User_OwnedAssignedSingleRoles" /&gt;

  <em>One entity instance containing the single roles, and one association instance linking it to the role assignment data:</em>
  &lt;EntityInstance Identifier="Directory_User_OwnedAssignedSingleRoles_Role" DisplayName_L1="Bundle" EntityType="SingleRole" /&gt;
  &lt;AssociationInstance Association="AssignedSingleRole.Role" Direction="From1To2" Instance1="Directory_User_OwnedAssignedSingleRoles" Instance2="Directory_User_OwnedAssignedSingleRoles_Role" /&gt;

&lt;/Universe&gt;
```

![Universe (Template Schema: Owned Single Roles)](/images/identitymanager/Universe_OwnedSingleRolesSchema.webp)

When [getting Identity Manager data in Power BI](../../../../../../admin/governance/reporting/how-tos/connect-powerbi.md), the following appears:
![Universe (Template: Owned Single Roles)](/images/identitymanager/Universe_OwnedSingleRoles.webp)

#### OwnedCompositeRoles

The following example generates a universe `U7_User` based on the entity type `Directory_User` and the bundles assigned to users:

```xml
&lt;Universe Identifier="U7_User" DisplayName_L1="U7 - User" ColumnNamesMode="Identifier"/&gt;
&lt;UniverseDataModel Universe="U7_User" EntityType="Directory_User"&gt;
    <b>&lt;UniverseTemplate Template="OwnedCompositeRoles"/&gt;</b>
&lt;/UniverseDataModel&gt;
```

The configuration generated by this snippet is similar to the one for `OwnedSingleRoles`.

![Universe (Template Schema: Owned Bundles)](/images/identitymanager/Universe_OwnedCompositeRolesSchema.webp)

When [getting Identity Manager data in Power BI](../../../../../../admin/governance/reporting/how-tos/connect-powerbi.md), the following appears:
![Universe (Template: Owned Bundles)](/images/identitymanager/Universe_OwnedCompositeRoles.webp)


## Mixed Example
Scaffoldings can be adjusted with [universe configuration](../../../business-intelligence/index.md).

The following example generates a universe `U9_AccessControl` aiming to create reports displaying users and their profiles. In our situation, profiles are assigned to AD accounts based on a given context. This is why we base our universe on the entity types `AD_Entry`, `AssignedProfile` and `ProfileContext`. Plus, there are 10 dimensions in contexts, but only dimensions 0 and 1 are used, so we exclude the others. We exclude also resource types and single roles that are of no use for us here.

```xml
<Universe Identifier="U9_AccessControl" DisplayName_L1="U9_AccessControl" ColumnNamesMode="Identifier">
    <EntityInstance EntityType="AD_Entry" Identifier="AssignedProfile_User"/>
</Universe>

<UniverseDataModel Universe="U9_AccessControl" EntityType="AssignedProfile"/>

<UniverseDataModel Universe="U9_AccessControl" EntityType="ProfileContext">
    <RootInstance Instance="AssignedProfile_Context"/>
    <ExcludedProperty Property="AssignedProfiles"/>
    <ExcludedProperty Property="Category"/>
    <ExcludedProperty Property="CompositeRole"/>
    <ExcludedProperty Property="Dimension2"/>
    <ExcludedProperty Property="Dimension3"/>
    <ExcludedProperty Property="Dimension4"/>
    <ExcludedProperty Property="Dimension5"/>
    <ExcludedProperty Property="Dimension6"/>
    <ExcludedProperty Property="Dimension7"/>
    <ExcludedProperty Property="Dimension8"/>
    <ExcludedProperty Property="Dimension9"/>
    <ExcludedProperty Property="Dimension10"/>
    <ExcludedProperty Property="ResourceType"/>
    <ExcludedProperty Property="SingleRole"/>
</UniverseDataModel>
```

When [getting Identity Manager data in Power BI](../../../../../../admin/governance/reporting/how-tos/connect-powerbi.md), the following appears:
![Universe (Mixed Example)](/images/identitymanager/universe_mixedexample.webp)
