UMRA – Web Based Group Management

5:37 PM / Comments (0) / by Tech Admin

If you haven’t already download the free trail version of User Management Resource Administrator here à Download

If you want to learn the basics on how to connect to UMRA with its COM object, please see my original post on “Basics of UMRA COM

UMRAWeb Based Group Management

Group Management in Active Directory is no easy task, however with UMRA these time consuming task are now handled with ease, and precision. Many of our clients want some type of UMRA – Web Based Group Management web page in a portal, or integrated in an intranet site they may already have in place. Most of these tasks range from creating a new group, adding / removing members from a group, and adding groups to groups. This is not easy task when creating a web page that has all these functions. However, we utilize UMRA – Automation Module COM object to allow users to send data to specific UMRA projects, and have UMRA handle all the Active Directory work, or downstream systems work. Below is a quick VBScript that will loop through a table of a Active Directories Users Account, and Display the DN’s of that group on the screen. When you click on the Active Directory Group name, it will prompt you with the Groups DN.

First setup a UMRA – Automation project and get any users “memberof” attribute and add that to a table called “usersgroups”. If you need help with this, please see previous blog posts.

Second Step…Copy and paste this into your .asp file, and run it. You will see all the Active Directory Users Groups DN’s listed, and when you click the group name, you will prompt with the groups “DN”.

VBSCRIPT

'Create/Set Variables
Dim RetVal
Dim UMRA_Server
Dim UMRA_Port
Dim RowIndex

UMRA_Server = "MyServerName"
UMRA_Port = 56814
RowIndex = 0
'End Create/Set Vairbales

Set Umra = Server.CreateObject("UMRAcom.Umra") ' Create a New Instance of UMRA
Set UmraDataTable = Server.CreateObject("UMRAcom.UmraDataTable") ' Create a New Instance of UMRAcDataTable

RetVal=Umra.Connect(UMRA_Server,UMRA_Port) ' Connect to UMRA
Response.write "Connection to UMRA:" & RetVal & "<br>"

if (RetVal=0) then
RetVal=Umra.ExecuteProjectScript("My UMRA Script Name") ' Connect to your UMRA script
Response.write "Connection to UMRA Script:" & RetVal & "<br>"

if (RetVal=0) then
RetVal=Umra.GetVariableDataTable("%usersgroups%",UmraDataTable)
Response.write "Connection to UMRA DataTable:" & RetVal & "<br>"
RowIndex=0 ' Create a new Row Counter
RetVal=UmraDataTable.GetCellText(RowIndex,0,groupdn) ' Column 0 of our datatable

While (RetVal=0)
'Here is where we do the loop, and display on the page, the contents of the
Response.write "Group Name:<a href=""javascript: void(0)"" onclick=""showgroupdn('"&groupdn&"')"">"& groupdn & "</a><br>"
RowIndex1 = RowIndex1 + 1 ' After we get row 0, lets increment to get row 1 etc.
RetVal=UmraDataTable.GetCellText(RowIndex,0,groupdn) ' Column 0 of our datatable

Wend
else
Response.Write "Form Project Not Found"
end if
end if

END VBSCRIPT

This is only the first step to UMRA – Web Based Group Management in a portal, or intranet. In our next post I will show you how to setup buttons to remove groups from a specific user.

0 comments:

 
-->