Use roles from SSAS in XMLA

Data source

by Flexmonster Pivot Table

HTML

<script src="https://cdn.flexmonster.com/flexmonster.js"></script>

<div>
  <h2>How to use roles from SSAS in XMLA</h2>
  <p>
    This example demonstrates how to use roles from Microsoft Analysis Services
    in Flexmonster using XMLA.
  </p>
  <p>
    Roles are used to grant access to the data. If roles are configured in
    Analysis Services, you can specify them in the
    <code>dataSource.roles</code> property.
  </p>
  <p>
    <a
      href="https://www.flexmonster.com/doc/configuring-authentication-process-for-ssas-xmla/#roles"
      target="_blank"
    >Learn more about managing authentication in our documentation</a>.
  </p>
</div>

<div id="pivot-container"></div>

CSS

@import url(https://cdn.flexmonster.com/assets/jsfiddle-styles.css);

JavaScript

let pivot = new Flexmonster({
  container: "#pivot-container",
  componentFolder: "https://cdn.flexmonster.com/",
  width: "100%",
  height: 400,
  report: {
    dataSource: {
      type: "microsoft analysis services",
      /* URL to msmdpump.dll */
      proxyUrl: "https://olap.flexmonster.com/olap/msmdpump.dll",
      /* Catalog name */
      catalog: "Adventure Works DW Standard Edition",
      /* Cube name */
      cube: "Adventure Works",
      /* Role */
      roles: "Sales Manager US"
    },
    slice: {
      rows: [{
       		uniqueName: "[Geography].[Geography]",
       	 	sort: "asc"
      }],
      columns: [
      	{
      		uniqueName: "[Product].[Category]",
          sort: "asc"
        },
        { uniqueName: "[Measures]" }
      ],
      measures: [
      	{
          uniqueName: "[Measures].[Reseller Order Count]",
          aggregation: "none",
          active: true
        },
        {
          uniqueName: "[Measures].[Discount Amount]",
          aggregation: "none",
          active: true
        }
      ]
    }
  }
});