1
votes

I'm unable to add members to an SSAS role through Visual Studio. I can create a role in Visual Studio. I can add member through SSMS but cant add members through my Visual Studio project. The problem comes when I need to deploy my solution, all members added through SSMS disappear; hence, I need to solve the problem of not being able to add members through my project in Visual Studio. maybe I need to give Visual Studio some permission?

I expect to be able to add members through my SSAS Visual Studio project and when I deploy the project again the members of the role don't get affected.

Right now, when I click on the Add.. button nothing happens

Snapshot of the Visual Studio

4

4 Answers

3
votes

I have the same issue in Visual Studio SSDT 2017

My workaround is to hit "F7" on the associated role (or right-click and go to view code.) You'll see that the role is just XML anyways and you can easily add a new <Member> and <Name> Attribute

For example, here is the XML for my test role:

<Role xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ddl2="http://schemas.microsoft.com/analysisservices/2003/engine/2" xmlns:ddl2_2="http://schemas.microsoft.com/analysisservices/2003/engine/2/2" xmlns:ddl100_100="http://schemas.microsoft.com/analysisservices/2008/engine/100/100" xmlns:ddl200="http://schemas.microsoft.com/analysisservices/2010/engine/200" xmlns:ddl200_200="http://schemas.microsoft.com/analysisservices/2010/engine/200/200" xmlns:ddl300="http://schemas.microsoft.com/analysisservices/2011/engine/300" xmlns:ddl300_300="http://schemas.microsoft.com/analysisservices/2011/engine/300/300" xmlns:ddl400="http://schemas.microsoft.com/analysisservices/2012/engine/400" xmlns:ddl400_400="http://schemas.microsoft.com/analysisservices/2012/engine/400/400" xmlns:ddl500="http://schemas.microsoft.com/analysisservices/2013/engine/500" xmlns:ddl500_500="http://schemas.microsoft.com/analysisservices/2013/engine/500/500" xmlns:dwd="http://schemas.microsoft.com/DataWarehouse/Designer/1.0" dwd:design-time-name="7979a90c-d53d-4f48-8969-4bd239b43346" xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">
  <ID>Test Role</ID>
  <Name>Test Role</Name>
  <CreatedTimestamp>0001-01-01T05:00:00Z</CreatedTimestamp>
  <LastSchemaUpdate>0001-01-01T05:00:00Z</LastSchemaUpdate>
  <Description>Role for testing</Description>
  <Members>
    <Member>
      <Name>127.0.0.1\TestUser</Name>
    </Member>
  </Members>
</Role>
0
votes

The popup that should appear when pressing the add button is not from visual studio but from active directory. You might not have the correct permissions to open that window.

But why do you need to add members before deployment, is your deployment envrionnement the same as your production environnement. If that is the case you should look at your deployment process because roles shouldn't disappear from your database when deploying.

0
votes

I was with the same problem, but they released a new version to fix that: Can't add user to SSAS role. So I just upgraded to 2.9.12 version, and now it's working as it should.

0
votes

Very weird workaround that someone might find useful so i post it here.

The add button did not react to being clicked. To check if it is due to some lack of access rights i wanted to check if i can browse a cube and change the user. So i browsed a cube WITHIN the SSAS project. I used the "Change User" option in the top left and changed it to a AD User. Browsing with the AD User worked. After that i checked the "ADD" button in again and now it worked.

I can not explain why, but after changing the user the button works. But only for the duration the project is opened. Once you close the project and reopen it the button does not work anymore.