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

Question

Question

Is it possible to remove user licenses from accounts in LFDS using the LMO SDK?

asked on April 12, 2023

Hi,

We have users being provisioned into Directory Server using Okta SCIM (On Prem Provisioning).

Once in Directory Server we can assign users to different groups using License Manager Objects in a workflow script.

Most users are accessing the repository using WebLink with security trimmed via groups and these users don't need a license to access.  However, I haven't found a way not to assign licenses when provisioning from Okta so I'd like to remove licenses when assigning the groups as part of the same script.

The problem is when I use

u.Licenses = new Guid[1] {LFDS.WellKnownLicenseType.None};
u.Update();

(where u is a User object)

The script fails with a "Resource not licensed" message.

Is there a way to achieve removal of licenses automatically or is it just not possible?

many thanks,

Ian

0 0

Replies

replied on April 13, 2023

To answer my own question, after looking at the directory server  user_licenses table and seeing that users without a license were simply absent (not assigned a type of None) I tried the following...

u.Licenses = new Guid[] {};
u.Update();

...which appears to work.

No script error and the user appears in Directory Server with None as the License.

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

Sign in to reply to this post.