Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access Manager User Classes

Status
Not open for further replies.

JDiaz1125

MIS
Oct 8, 2003
6
US

Need help on extracting access manager user classes to a *.CSV file or *.xls any help will be appreciated.

- Jose
 
You can use a macro to do this. There is an example on Cognos's website.
 
Here is a macro that will write the user classes to a text file. You should just be able to change that to csv:
*====================================================================================================================
' * ClassUserList.mac
' *
' * This macro gets the userclass list and, for each userclass, the users list.
' * All are written into a text file.
' *
' *====================================================================================================================

Option Explicit

Sub Get_Users_List(UserClass As Object)

Dim I As Integer

If UserClass.Users.Count > 0 Then
For I = 1 To UserClass.Users.Count
Print #1, UserClass.Name & ":" & UserClass.Users(I).Name
Next
else
Print #1, UserClass.Name & ":"
End If

If UserClass.UserClasses.Count >= 0 Then
For I = 1 To UserClass.UserClasses.Count
Call Get_Users_List(UserClass.UserClasses(I))
Next
End If

End Sub

Sub Main()

Dim objAuthApp As Object ' Access Manager Application Object
Dim objAuthDoc As Object ' Access Manager Document Object
Dim objDSConfig As Object

Const AdminUser = "Administrator"
Const AdminSignon = ""
Const NameSpace = "default"
Const FileName = "C:ClassUsers.Txt"

' Calls Access Manager and opens namespace with admin signon
Set objAuthApp = CreateObject("Authenticator2.Application")
Set objAuthDoc = objAuthApp.Documents.OpenWithBasicSignon(NameSpace, AdminUser, AdminSignon, 0)

' Opens output file and writes title
Open FileName For Output As #1
Print #1, "User Class:User Name"

' Calls recursive procedure for getting users list
Call Get_Users_List(objAuthDoc.RootUserClass)

' Closes output file
Close #1

' Exits Access Manager
objAuthApp.Quit
Set objAuthDoc = Nothing
Set objAuthApp = Nothing

End Sub


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top