11-28-2016 03:00 PM - edited 03-19-2019 11:52 AM
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?
11-28-2016 07:11 PM
Ok, let try this....
Who's up for a Query in CUDLI? Jeff if you're around I need you!
11-29-2016 09:16 AM
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.
11-30-2016 10:39 AM
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()
02-19-2019 06:01 PM - edited 02-19-2019 06:04 PM
Sorry posted on the wrong thread
Cheers
BS
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide