MicroStrategy Embedding SDK Samples
A collection of samples highlighting functionality and workflows of the Embedding SDK.
MicroStrategy Embedding SDK
For more information, please visit the official documentation of MicroStrategy Embedding SDK.
How to get MicroStrategy Embedding SDK?
MicroStrategy Embedding SDK is included in your MicroStrategy Library Server. You can use it from your web application using a URL like this:
MicroStrategy REST API
MicroStrategy REST API is the backbone of MicroStrategy’s open architecture. MicroStrategy REST API is widely used in this project.
For more information about MicroStrategy REST API, please visit the official documentation and play with the live API Explorer.
This set of examples demonstrate specific features of Embedding SDK. Open each example to see what is possible with Embedding SDK. Make sure you check the source code for the implementation.
|Dossier page customization, page navigation, filters, and event handler||Demo|
|Guest authentication with multiple modes||Demo|
|Authentication with auth token||Demo|
|Authentication with Identity Token||Demo|
|SAML authentication 2021 SP2||Demo|
|Custom error handler||Demo|
|Using dossier instance ID||Demo|
|Customizing the Library Page with URL API||Demo|
|Selections on Visualization||Demo|
|Selections on Visualization (Initial Load)||Demo|
This example shows how to build a web page to show all the dossiers and documents in your library.
Single-Dossier React Application
MicroStrategy Dossier can be used as a standalone application. This example shows how to build a React-based single-dossier application using MicroStrategy Embedding SDK.
View this project at https://microstrategy.github.io/embedding-sdk-samples/.
A single-page application with Embedding SDK and REST API and third-party grid library. Link
If you plan to use the samples on a Web page that is on a different domain from your MicroStrategy environment, please also meet the following prerequisites.
Enable Cross-Origin Resource Sharing (CORS)
Cross-Origin Resource Sharing (CORS) provides a way for a web application running in one origin (domain, protocol, and port) to access selected resources from a server in a different origin. A cross-origin HTTP request uses additional HTTP headers to tell the browser to let the web application share resources. For security reasons, browsers restrict cross-origin HTTP requests initiated from within scripts. This means that when a web application requests HTTP resources from a different origin, the response from the other origin must include the right CORS headers.
To enable CORS for the REST Server:
Open the Library Admin page. Your URL should be similar to the following:
- Navigate to Library Server -> Security Settings.
- Choose the appropriate setting for Allow Library embedding in other sites to reconfigure CORS.
Using the Library Admin page is the easiest way to enable CORS for the REST Server, but you can also configure CORS manually.
- Navigate to
- Edit the configOverride.properties file in a text editor.
- Add the following lines, or replace them if already present:
- Restart your MicroStrategy Library web application hosted on the application server.
Google Chrome (version 80+) and Microsoft Edge (version 86+) introduced new changes that may impact embedding.
For Embedding SDK to function as expected in a 3rd party context, it is required to explicitly label session cookies with
For more information, see Chrome v80 Cookie Behavior and the Impact on MicroStrategy Deployments.