You are viewing limited content. For full access, please sign in.

Question

Question

Create user in LFDS using workflow

asked on May 4, 2021

I am currently getting a Resource not licensed error in the Workflow Script Editor script designed to create a new read only user in LFDS. Searching answers and reading the documentation LF provided does not seem to answer what I am missing. I have the following in a Try block. 

I have also added some message boxes for debugging so I know the error occurs when it gets to the LFDSUser.Register(). I suspect because of the message that the actual issue is with the LFDSUser.Licenses = new Guid(){ WellKnownLicenseType.Retrieval } which should set the license to read only. Is there another flag or something to make the user a read only user? Or is the resource not licensed indicating something else?

' Login to the Directory Server.
Dim server As Server = Server.Connect(sDirectoryServerHostName, False)
Dim db As Database = server.GetDatabaseByRealmName(sLicensingSiteName)
db.LoginWindows()

' Is the user already created?
Dim LFDSUser As LaserficheUser = LaserficheUser.Create(db)

' Need to create the user.
LFDSUser.ContainerID = GetOrganizationbyName(sOrganizationName, db)
LFDSUser.MfaRequired = False
LFDSUser.Name = sUsername
LFDSUser.Password = sPassword
LFDSUser.Enabled = True
LFDSUser.Licenses = new Guid(){ WellKnownLicenseType.Retrieval}
LFDSUser.Register()

 

0 0

Answer

SELECTED ANSWER
replied on May 5, 2021

Hi Michael,

That script appears to be correct. Have you double checked that your LFDS site has available Retrieval licenses?

0 0

Replies

replied on May 5, 2021

Thanks. You are right... WellKnownLicenseType.Retrieval does not correspond to the Only allow read-only access for the web link users. Dropping that line allows the user to be created.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.