Use SAML or OIDC authentication
The example in this topic illustrates how to display an embedded dashboard using SAML authentication. The same code works for OIDC except the loginMode
parameter.
A live example can be seen on GitHub. Also check out other examples.
The workflow
Here is the workflow of the example.
-
Client Application checks if auth token is still valid. If yes, jumps to Step 4.
-
Client Application opens the MicroStrategy Library Web login page (
https://[Your MicroStrategy Environment]/MicroStrategyLibrary/auth/login-dialog.jsp
) in a new tab. The login page will be responsible for showing a login dialog. -
After the user finishes logging in, the login page will send a JavaScript message to inform the Client Application.
-
The Client Application gets the message, fetches the auth token, and uses it to make REST API calls or uses it in MicroStrategy’s Embedding SDK.