Use roles from SSAS in Flexmonster Accelerator

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 Flexmonster Accelerator</h2>
  <p>
    This example demonstrates how to use roles from Microsoft Analysis Services
    in Flexmonster using
    <a
      href="https://www.flexmonster.com/doc/flexmonster-accelerator-introduction/"
      target="_blank"
    >Flexmonster Accelerator</a>.
  </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/#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

new Flexmonster({
  container: "#pivot-container",
  componentFolder: "https://cdn.flexmonster.com/",
  height: 400,
  toolbar: true,
  report: {
    dataSource: {
      type: "microsoft analysis services",
      // A flag to use the Accelerator instead of XMLA protocol binary
      binary: true,
      // URL to Flexmonster Accelerator
      proxyUrl: "https://olap.flexmonster.com:8085/FlexmonsterProxy/",
      // Catalog name
      catalog: "Adventure Works DW Standard Edition",
      // Cube name
      cube: "Adventure Works",
      // Roles from SSAS
      // You can add multiple roles separated by comma
      roles: "Sales Manager US"
    },
    slice: {
      rows: [
        { uniqueName: "[Geography].[Geography]" }
      ],
      columns: [
        {
          uniqueName: "[Product].[Category]"
        },
        {
          uniqueName: "[Measures]"
        }
      ],
      measures: [
        {
          uniqueName: "[Measures].[Reseller Order Count]"
        },
        {
          uniqueName: "[Measures].[Discount Amount]"
        }
      ],
    }
  }
});