top of page
Writer's pictureOmar Vidaure

How to Impersonate a MicroStrategy User

Updated: Apr 2, 2020


Update: I recently presented the details of how this works at a MicroStrategy Meetup. To see that video and a link to the group, see the bottom of this post.


There are times that you have to see an issue through the users eyes. All of the variables to identify an issue just do not line up when you're using your Power User.


There is good news though. You can impersonate a user within MicroStrategy by retrieving their user session.



How it Works

We can impersonate a user, but they do need to be involved. The way this will work is a user which needs support with their MicroStrategy environment will log in and run a document. Within the document they click the button to generate an email which has a link containing their user session. Because we're using the users session, no password information is passed via the link.


Getting Started

First, we need to have the document created (and accessible) by a typical user. So, create a document. We're going to be using javascript so add an html container.


Once the html container is added, make sure to select it's properties and make it and set it to html.



Next add the following code to your HTML container.


<script>

function usrImp() {

sessionLink = 'mailto:?subject=User%20Support&body=This%20email%20is%20intended%20for%20you%20designated%20support%20liaison.%0D%0A'+window.location.href+'?Server='+mstrApp.serverName+'%26Project='+mstrApp.projectName+'%26Port='+mstrApp.serverPort+'%26evt=2048001%26src=Main.aspx.2048001%26documentID='+mstrApp.docModelData.oid+'%26currentViewMedia=1%26visMode=0%26usrSmgr='+mstrApp.sessionState

window.location.href = sessionLink;

}

document.getElementById("applyBtn").addEventListener("click",usrImp);

</script>

<form name="applyForm">

<input id="applyBtn"

value ="Get Help"

type="button"

></p>

</form>

</script>



Now when you run the document, you'll have the "Get Help" button available which will generate an email and open your email client. The user can now send a session log in to their designated support liaison.

Bonus: In the past I've posted on how to beautify your custom MicroStrategy buttons using out of the box formatting. Find that blog here- Custom Format Your Javascript Buttons the Easy Way






 

Thanks for checking out this blog post. If you found this post helpful please consider donating via PayPal. Any contribution is appreciated!


1,095 views0 comments

Comments


bottom of page