Hi, I have the below code. I simplified it to get the example easy. I'm trying to figure out how to grab the username of the logged-in user. I assume the issue is somewhere around my "(IEdmUserMgr5)myVault".
if (poCmd.mlCmdID == 1000) //This makes sure the menu command ID was 1000, which means your addin was the one called
IEdmVault12 myVault = (IEdmVault12)poCmd.mpoVault; //Cast the vault to an Iedmvault12 object for latest functionality
IEdmUserMgr5 userMgr = (IEdmUserMgr5)myVault
IEdmUser5 user = (IEdmUser5)myVault;
user = userMgr.GetLoggedInUser();
if (user.Name != "admin")
MessageBox.Show("This add-in is in Beta Mode, you do not have permission to use it.");