Create role and add domain user

315
0
01-25-2019 02:20 AM
RavinHasseea1
New Contributor III

Hi I am trying to create a db role using 

arcpy.CreateRole_management(sdeconn, "rolename", "GRANT", "domain\username")

This is failing with following error message, although it seems to have created the role and added the AD user to it

Error granting role privilege to the user. [Invalid parameter value passed to function]
Failed to execute (CreateRole).

I have also tried using double backslash domain\\username

If I remove the domain as I am working in the same domain, it fails to add user as it cannot find it

Error granting role privilege to the user. [DBMS table not found [42000:[Microsoft][ODBC Driver 13 for SQL Server][SQL Server]Cannot add the principal ''username'', because it does not exist or you do not have permission.]]
Failed to execute (CreateRole).

Has anyone been able to get the correct syntax for this?

Tags (1)
0 Kudos
0 Replies