Knowledge Partner
Knowledge Partner

Re: Office365 Problems assigning multiple licenses, single event

On Wed, 28 Oct 2015 22:46:34 +0000, Paul Kennett wrote:

> I have also seen an issue. My post you replied to had a policy that
> used when='after' and sythesised the object the action is applied to.
> This worked for me under the older version as it generated separate
> event. Under IDM 4.5 and the latest version the 2nd licence operation
> seems to always fail. I haven't got a resolve for this. Was that what
> you meant?


Post a level 3 trace?


--
--------------------------------------------------------------------------
David Gersic dgersic_@_niu.edu
Knowledge Partner http://forums.microfocus.com

Please post questions in the forums. No support provided via email.
If you find this post helpful, please click on the star below.
0 Likes
karmst2 Absent Member.
Absent Member.

Re: Office365 Problems assigning multiple licenses, single event


Hello,

It appears the suggested way to handle this does not work with IDM 4.5
and the 4.1.0.2 Driver. Below is the way I got around it. A bit dirty,
as it only handles if there are 2 licenses, but time was not on my side.
I basically just used the PSExecute method of doing the call myself. The
<arg-dn> method fails, and the Remote Loader trace has a Powershell call
to Get-User -Identity - and then it stops.

<rule>
<description>[User, add] DRIVER FIX - LicenseAgreement
problem</description>
<conditions>
<and>
<if-class-name mode="nocase" op="equal">User</if-class-name>
<if-operation mode="nocase" op="equal">add</if-operation>
<if-xpath
op="true">count(./add-attr[@attr-name='LicenseAssignment']) =
2</if-xpath>
</and>
</conditions>
<actions>
<do-trace-message>
<arg-string>
<token-global-variable name="ConnectedSystemName"/>
<token-text xml:space="preserve"> : [</token-text>
<token-src-name/>
<token-text xml:space="preserve">] License is being added twice. I
need to fix this [</token-text>
<token-xpath
expression="count(./add-attr[@attr-name='LicenseAssignment'])"/>
<token-text xml:space="preserve">] [</token-text>
<token-operation/>
<token-text xml:space="preserve">]</token-text>
</arg-string>
</do-trace-message>
<do-set-local-variable name="varBrokenLicense">
<arg-string>
<token-xpath
expression="./add-attr[@attr-name='LicenseAssignment'][last()]"/>
</arg-string>
</do-set-local-variable>
<do-strip-xpath
expression="./add-attr[@attr-name='LicenseAssignment'][last()]"/>
<do-trace-message>
<arg-string>
<token-global-variable name="ConnectedSystemName"/>
<token-text xml:space="preserve"> : [</token-text>
<token-src-name/>
<token-text xml:space="preserve">] Now I have this many Licenses:
</token-text>
<token-xpath
expression="count(./add-attr[@attr-name='LicenseAssignment'])"/>
</arg-string>
</do-trace-message>
<do-add-dest-attr-value name="PSExecute">
<arg-value type="string">
<token-text xml:space="preserve">Set-MSolUserLicense
-UserPrincipalName '</token-text>
<token-op-attr name="CN"/>
<token-text xml:space="preserve">@</token-text>
<token-global-variable name="drv.domain.name"/>
<token-text xml:space="preserve">' -AddLicenses '</token-text>
<token-local-variable name="varBrokenLicense"/>
<token-text xml:space="preserve">'</token-text>
</arg-value>
</do-add-dest-attr-value>
</actions>
</rule>

Cheers,

-Keith


--
karmst
------------------------------------------------------------------------
karmst's Profile: https://forums.netiq.com/member.php?userid=2806
View this thread: https://forums.netiq.com/showthread.php?t=51737

0 Likes
Highlighted
Knowledge Partner
Knowledge Partner

Re: Office365 Problems assigning multiple licenses, single event

On Wed, 10 Aug 2016 14:44:02 +0000, karmst wrote:

> It appears the suggested way to handle this does not work with IDM 4.5
> and the 4.1.0.2 Driver.


What does not work? Got a trace of it not working so we can see what
happens?


--
David Gersic
Knowledge Partner http://forums.microfocus.com
If you find this post helpful, please click on the star below.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.