SSAS - Error THE ‘ROLE’ WITH ‘ID’ = {ID} DOESN’T EXIST IN THE COLLECTION.

Peter Schmitz

Administrator
Staff member
Today I was working on a new cube project. Basically we will be adding existing as well as new objects to a new cube. This will ensure the users will not be overwhelmed with all the objects existing in the existing cubes, but rather just see the subset they are interested in (and taking these from several other cubes, hence not being able to just create a perspective).

Rather than re-doing all the work involved in defining dimensions, I imported the existing ones by right-clicking on the project, and selecting "Add" -> "Existing Item":

upload_2017-11-14_13-56-44.png


Unfortunately, when I then attempted to build the cube, I was greeted with the error message:

The 'Role'with 'ID'= 'Role2' doesn't exist in the collection.

Apparently one of the objects I just added to the project contained some security settings. To resolve this, I right-clicked the dimensions in the project, and used the "View Code" option.

In the code, you should look for "Permisisons". In my case, this revealed the following code:

<DimensionPermissions>
<DimensionPermission dwd:design-time-name="ed1ca325-a5cd-4213-b53c-176e93464849">
<ID>DimensionPermission</ID>
<Name>DimensionPermission</Name>
<CreatedTimestamp>0001-01-01T00:00:00Z</CreatedTimestamp>
<LastSchemaUpdate>0001-01-01T00:00:00Z</LastSchemaUpdate>
<RoleID>Role 2</RoleID>
<ReadDefinition>Allowed</ReadDefinition>
<Read>Allowed</Read>
</DimensionPermission>
</DimensionPermissions>

After removing that entire block of code, i was able to build my project again.
 
Top