Hi,
Recently, I came across a situation where I have to manage user permission in BAM Views. Eventhough I found so many help documents, references etc., most of them were difficult to understand or not working. After few desperate attends I found the view it works.
To do the actions in command prompt, open “cmd.exe” and go to “<Installpath>:\Program Files (x86)\Microsoft BizTalk Server 2013\Tracking” location.
Now, Let us say we have a View “BAM_VIEW_TEST” and the user account for which we wanted to give access is “arun” on the AD domain “myCompany”. To add a access to the view for the mentioned users, below command can be used.
bm Add-Account -AccountName:myCompany\arun -View:BAM_VIEW_TEST
To remove a user from the accessing a view, below command can be used.
bm remove-Account -AccountName:myCompany\arun -View:BAM_VIEW_TEST
Note : 1. To get the list of all views you can use “bm get-views” command
2. For getting the users associated with a view, below command can be executed
bm get-accounts -View:<view name>
eg. bm get-accounts -View:BAM_VIEW_TEST
Select Name,SID,SUser_SName(SID) as UserAccount from sysusers
WHERE ISLogin = 1 AND issqluser = 0 AND isntuser = 1