cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1696
Views
5
Helpful
4
Replies

Unity Connection User Data Dump

cbelcher
Level 1
Level 1

Hey guys trying to figure out what "Authentication Rules" all my users have set.  I figured I'd just run the User Data Dump, but it seems that is one of the few parameters that isn't output.

Any suggestions? 

4 Replies 4

cbelcher
Level 1
Level 1

Ok, let try this....

Who's up for a Query in CUDLI?  Jeff if you're around I need you!

Thanks to Mr. Lindborg for this solution.

This is the query I was looking for.

SELECT vw_credentialpolicy.DisplayName, vw_credential.CredentialType, vw_subscriber.alias
FROM vw_credentialpolicy, vw_credential, vw_subscriber
WHERE vw_credential.UserObjectId = vw_subscriber.ObjectId
AND vw_credentialpolicy.ObjectId = vw_credential.CredentialPolicyObjectId

Now I need to figure out how to bulk change the policy for all my users.

With Mr. Lindborg pointing me to the Cisco Unity Python Scripting Host tool I was able to pull it off.  

This is script:

#Update Authentication Rule and resets Doesn't Expire parameter to 0 for all users
#Cred Type 4 = TUI and 3 = GUI
#You need to use CUDLI to figure out the Credential Policy OID
#Created by Craig Belcher


import clr
clr.AddReference('System.Data')
clr.AddReference('Cisco.Unity.Connection.PythonScriptingHost')
from System.Data import DataTable
from System import DateTime
from Cisco.Unity.Connection.PythonScriptingHost import ProcDataType

Helpers.SetActiveDatabase("UnityDirDb")

query = 'SELECT vw_subscriber.objectid, vw_Subscriber.Alias FROM vw_subscriber'

dtUsers = Helpers.CreateDataTable(query)

assert dtUsers.Rows.Count>0,"No users found"

print('Users found ='+str(dtUsers.Rows.Count))

for user in dtUsers.Rows:
print('Updating:'+user['alias'])

#build and execute a stored proc the easy way
Helpers.StartNewCommand('csp_credentialmodify')
Helpers.AddCommandParam('pUserObjectID',ProcDataType.Char,user['objectid'])
Helpers.AddCommandParam('pCredentialType',ProcDataType.Integer,'3')
Helpers.AddCommandParam('pDoesntExpire',ProcDataType.SmallInt,'0')
Helpers.AddCommandParam('pCredentialPolicyObjectID',ProcDataType.Char,'712fcf5b-917a-48d8-b655-98df3d529eb0')
Helpers.ExecuteProc_NoRet()

 

Sorry posted on the wrong thread

Cheers

BS