I am trying to get a list of roles existing in an SSAS DB using XMLA. I need only roles, not other information.
I know there is a <RequestType>DISCOVER_XML_METADATA</RequestType>
:
<Discover xmlns="urn:schemas-microsoft-com:xml-analysis">
<RequestType>DISCOVER_XML_METADATA</RequestType>
<Restrictions>
<RestrictionList xmlns="urn:schemas-microsoft-com:xml-analysis">
<DatabaseID>SSAS_DB_ID</DatabaseID>
</RestrictionList>
</Restrictions>
<Properties>
<PropertyList>
</PropertyList>
</Properties>
</Discover>
The query returns a ~9Mb XML containing complete information about the database, including the information that I do not need.
Yes, it does contain the piece with the roles:
...
<Roles>
<Role>
<Name>ROLE_NAME_AND_ID1</Name>
<ID>ROLE_NAME_AND_ID1</ID>
<CreatedTimestamp>2020-05-13T11:20:27.343333</CreatedTimestamp>
<LastSchemaUpdate>2020-06-03T06:16:53.816667</LastSchemaUpdate>
<Description />
<Members>
<Member>
<Sid>SID1</Sid>
<Name>DOMAIN\LOGIN1</Name>
</Member>
<Member>
<Sid>SID2</Sid>
<Name>DOMAIN\LOGIN2</Name>
</Member>
</Members>
</Role>
</Roles>
...
But I would like to have only the role list without anything else.
Could not find a clear explanation on the web or MS website (where the documentation is extremely quirky for me) and would appreciate any insights.