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()