Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
Anonymous_User Absent Member.
Absent Member.
374 views

Office365 Problems assigning multiple licenses, single event


working with O365 driver and have ran into a couple glitches when trying
to apply multiple licenses to user in a single event/transaction when a
user is entitled to / receives multiple licenses. If we separate out
the transactions and apply each license, 1 per event/transaction, then
it all works just fine. It seems the syntax the driver assembles is not
correct for the Set-MSolUserLicense.

<modify cached-time="20140912205314.654Z" class-name="MSolUser"
event-id="meta#20140912205314#1#1:dd3f4a63-884a-489e-3688-634a3fdd4a88"
qualified-src-dn="O=People\OU=Users\CN=ao365lictst"
src-dn="\META-TREE\People\Users\ao365lictst" src-entry-id="151028"
timestamp="1410555194#7">
<association
state="associated">0d90a3e2-a4e5-4062-8279-7c8c8a282eaf</association>
<modify-attr attr-name="LicenseAssignment">
<add-value>
<value type="string">KuMed:OFFICESUBSCRIPTION_STUDENT</value>
</add-value>
</modify-attr>
<modify-attr attr-name="LicenseAssignment">
<add-value>
<value type="string">KuMed:STANDARDWOFFPACK_STUDENT</value>
</add-value>
</modify-attr>
<modify-attr attr-name="UsageLocation">
<add-value>
<value type="string">US</value>
</add-value>
<remove-all-values />
</modify-attr>
</modify>
</input>
</nds>
DirXML: [09/12/14 15:53:14.631]: TRACE: SUB: get-pssession
DirXML: [09/12/14 15:53:14.631]: TRACE: SUB: get-msoluser -ObjectID
0d90a3e2-a4e5-4062-8279-7c8c8a282eaf
DirXML: [09/12/14 15:53:14.897]: TRACE: SUB: get-pssession
DirXML: [09/12/14 15:53:14.897]: TRACE: SUB: Set-MSolUser -ObjectID
0d90a3e2-a4e5-4062-8279-7c8c8a282eaf -UsageLocation 'US'
DirXML: [09/12/14 15:53:15.116]: TRACE: SUB: get-pssession
DirXML: [09/12/14 15:53:15.116]: TRACE: SUB: Set-MSolUserLicense
-UserPrincipalName 'ao365lictst@kumc.edu' -AddLicenses
'KuMed:OFFICESUBSCRIPTION_STUDENT,KuMed:STANDARDWOFFPACK_STUDENT'
DirXML: [09/12/14 15:53:15.381]: TRACE: SUB: Unable to assign this
license because it is invalid. Use the Get-MsolAccountSku cmdlet to
retrieve a list of valid licenses.

I believe the correct syntax should be: Set-MSolUserLicense
-UserPrincipalName 'ao365lictst@kumc.edu' -AddLicenses
'KuMed:OFFICESUBSCRIPTION_STUDENT','KuMed:STANDARDWOFFPACK_STUDENT'

You see the difference with the additional ticks surrounding the comma
that separates the two licenses.

This rule is the "Assign Licenses for License Entitlement being granted
or revoked, in the NOVLOFFIENTEX-sub-ctp-EntitlementsImpl.Subscriber
policy.


We also found similar issue with it also trying to duplicate the
"UsageLocation" value do to the "for each/do" loop and we would end up
with it trying to put "US,US" into UsageLocation, which would throw a
syntax error since it is a 2 char destination field. So we moved that
rule outside of the "for each/do" loop, so we only get a single "US" as
shown above now. But that also seems like a bug with this particular
policy.

Has anyone else ran into this/fixed it ? or possibly it is a bug that
is already known??

Set-MsolUserLicense -ObjectId <Guid> [-AddLicenses <string[]>]
[-LicenseOptions <LicenseOption[]>] [-RemoveLicenses <string[]>]
[-TenantId <Guid>] [<CommonParameters>]

This is on a <product edition="Advanced"
version="4.0.2.5">DirXML</product> engine
driver version: <product build="201309111957"
instance="\META-TREE\Services\Dirxml\IDM\Office365"
version="4.0.0.2">Identity Manager Driv
er for Microsoft Office365</product>
eDir 8.8.8 P2 HF1 Binary Version: 20803.05

Thanks for any suggestions!


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

Labels (1)
0 Likes
14 Replies
cpedersen Outstanding Contributor.
Outstanding Contributor.

Re: Office365 Problems assigning multiple licenses, single event

Could I ask you to open a Service Request for this ?

The "US,US" issue have been logged as a bug.

Thanks,

Casper


On 9/12/14, 11:33 PM, mmiltenberger wrote:
>
> working with O365 driver and have ran into a couple glitches when trying
> to apply multiple licenses to user in a single event/transaction when a
> user is entitled to / receives multiple licenses. If we separate out
> the transactions and apply each license, 1 per event/transaction, then
> it all works just fine. It seems the syntax the driver assembles is not
> correct for the Set-MSolUserLicense.
>
> <modify cached-time="20140912205314.654Z" class-name="MSolUser"
> event-id="meta#20140912205314#1#1:dd3f4a63-884a-489e-3688-634a3fdd4a88"
> qualified-src-dn="O=People\OU=Users\CN=ao365lictst"
> src-dn="\META-TREE\People\Users\ao365lictst" src-entry-id="151028"
> timestamp="1410555194#7">
> <association
> state="associated">0d90a3e2-a4e5-4062-8279-7c8c8a282eaf</association>
> <modify-attr attr-name="LicenseAssignment">
> <add-value>
> <value type="string">KuMed:OFFICESUBSCRIPTION_STUDENT</value>
> </add-value>
> </modify-attr>
> <modify-attr attr-name="LicenseAssignment">
> <add-value>
> <value type="string">KuMed:STANDARDWOFFPACK_STUDENT</value>
> </add-value>
> </modify-attr>
> <modify-attr attr-name="UsageLocation">
> <add-value>
> <value type="string">US</value>
> </add-value>
> <remove-all-values />
> </modify-attr>
> </modify>
> </input>
> </nds>
> DirXML: [09/12/14 15:53:14.631]: TRACE: SUB: get-pssession
> DirXML: [09/12/14 15:53:14.631]: TRACE: SUB: get-msoluser -ObjectID
> 0d90a3e2-a4e5-4062-8279-7c8c8a282eaf
> DirXML: [09/12/14 15:53:14.897]: TRACE: SUB: get-pssession
> DirXML: [09/12/14 15:53:14.897]: TRACE: SUB: Set-MSolUser -ObjectID
> 0d90a3e2-a4e5-4062-8279-7c8c8a282eaf -UsageLocation 'US'
> DirXML: [09/12/14 15:53:15.116]: TRACE: SUB: get-pssession
> DirXML: [09/12/14 15:53:15.116]: TRACE: SUB: Set-MSolUserLicense
> -UserPrincipalName 'ao365lictst@kumc.edu' -AddLicenses
> 'KuMed:OFFICESUBSCRIPTION_STUDENT,KuMed:STANDARDWOFFPACK_STUDENT'
> DirXML: [09/12/14 15:53:15.381]: TRACE: SUB: Unable to assign this
> license because it is invalid. Use the Get-MsolAccountSku cmdlet to
> retrieve a list of valid licenses.
>
> I believe the correct syntax should be: Set-MSolUserLicense
> -UserPrincipalName 'ao365lictst@kumc.edu' -AddLicenses
> 'KuMed:OFFICESUBSCRIPTION_STUDENT','KuMed:STANDARDWOFFPACK_STUDENT'
>
> You see the difference with the additional ticks surrounding the comma
> that separates the two licenses.
>
> This rule is the "Assign Licenses for License Entitlement being granted
> or revoked, in the NOVLOFFIENTEX-sub-ctp-EntitlementsImpl.Subscriber
> policy.
>
>
> We also found similar issue with it also trying to duplicate the
> "UsageLocation" value do to the "for each/do" loop and we would end up
> with it trying to put "US,US" into UsageLocation, which would throw a
> syntax error since it is a 2 char destination field. So we moved that
> rule outside of the "for each/do" loop, so we only get a single "US" as
> shown above now. But that also seems like a bug with this particular
> policy.
>
> Has anyone else ran into this/fixed it ? or possibly it is a bug that
> is already known??
>
> Set-MsolUserLicense -ObjectId <Guid> [-AddLicenses <string[]>]
> [-LicenseOptions <LicenseOption[]>] [-RemoveLicenses <string[]>]
> [-TenantId <Guid>] [<CommonParameters>]
>
> This is on a <product edition="Advanced"
> version="4.0.2.5">DirXML</product> engine
> driver version: <product build="201309111957"
> instance="\META-TREE\Services\Dirxml\IDM\Office365"
> version="4.0.0.2">Identity Manager Driv
> er for Microsoft Office365</product>
> eDir 8.8.8 P2 HF1 Binary Version: 20803.05
>
> Thanks for any suggestions!
>
>


0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Office365 Problems assigning multiple licenses, single event

I am also seeing issues with multiple license entitlements, and have an SR
open. Ostensibly it's for the syntax error with the UserLocation parameter,
but I have worked around that as you suggest by putting it outside the loop.

Now I get a different symptom, from the same underlying cause, but I thought
it's worth stating here in case someone else has a similar issue. I have
used 2 Entitlements, 1 is for the OFFICESUBSCRIPTION_STUDENT, but the other
is a *customized* STANDARDWOFFPACK_STUDENT, minus the Lync and Exchange.
I'm getting the -AddLicenses parameter split by the -LicenseOptions
parameter, so that the OFFFICESUBSCRIPTION part is just tagged on to the end
of the wrong field:

DirXML: [09/15/14 18:02:30.396]: TRACE: SUB:
et-MSolUserLicense -UserPrincipalName 'o365test23@dom.com' -AddLicenses
'oursite:STANDARDWOFFPACK_STUDENT' -LicenseOptions
$oursite_STANDARDWOFFPACK_STUDENT_NoLyncExchange,oursite_OFFICESUBSCRIPTION_STUDENT

Instead of just failing, for some reason this generates a retry:
<output>
<status level="retry"
event-id="dace#20140915170153#5#3:e5733908-ae00-470a-9db0-083973e500ae">
<message>Exception of type 'DXMLBase.Xds.XdsRetryException' was
thrown.</message>
<exception-type>XdsRetryException</exception-type>
<stack-trace> at
DXMLMSOnlineDriver.SPSubscriberShim.ExecuteCommand(String cmd)
at DXMLMSOnlineDriver.SPSubscriberShim.modifyHandler(XdsOperation
xdsModify, XdsOutput xdsOutput)
at DXMLMSOnlineDriver.SPSubscriberShim.execute(XmlDocument doc,
IXmlQueryProcessor query)</stack-trace>
</status>
</output>

and round and round it goes........

I'm thinking out loud now, but I wonder whether as a workaround to this
ill-thought out code, I could create an entitlement for the 2nd license that
depends on the1st being fulfilled. That way, I could force them to hit the
driver 1 at a time. I'll try that later.

regards

Martin





"Casper Pedersen" <cpedersen@no-mx.forums.novell.com> wrote in message
news:xAyRv.6385$BB4.130@novprvlin0913.provo.novell.com...
> Could I ask you to open a Service Request for this ?
>
> The "US,US" issue have been logged as a bug.
>
> Thanks,
>
> Casper
>
>
> On 9/12/14, 11:33 PM, mmiltenberger wrote:
>>
>> working with O365 driver and have ran into a couple glitches when trying
>> to apply multiple licenses to user in a single event/transaction when a
>> user is entitled to / receives multiple licenses. If we separate out
>> the transactions and apply each license, 1 per event/transaction, then
>> it all works just fine. It seems the syntax the driver assembles is not
>> correct for the Set-MSolUserLicense.
>>
>> <modify cached-time="20140912205314.654Z" class-name="MSolUser"
>> event-id="meta#20140912205314#1#1:dd3f4a63-884a-489e-3688-634a3fdd4a88"
>> qualified-src-dn="O=People\OU=Users\CN=ao365lictst"
>> src-dn="\META-TREE\People\Users\ao365lictst" src-entry-id="151028"
>> timestamp="1410555194#7">
>> <association
>> state="associated">0d90a3e2-a4e5-4062-8279-7c8c8a282eaf</association>
>> <modify-attr attr-name="LicenseAssignment">
>> <add-value>
>> <value type="string">KuMed:OFFICESUBSCRIPTION_STUDENT</value>
>> </add-value>
>> </modify-attr>
>> <modify-attr attr-name="LicenseAssignment">
>> <add-value>
>> <value type="string">KuMed:STANDARDWOFFPACK_STUDENT</value>
>> </add-value>
>> </modify-attr>
>> <modify-attr attr-name="UsageLocation">
>> <add-value>
>> <value type="string">US</value>
>> </add-value>
>> <remove-all-values />
>> </modify-attr>
>> </modify>
>> </input>
>> </nds>
>> DirXML: [09/12/14 15:53:14.631]: TRACE: SUB: get-pssession
>> DirXML: [09/12/14 15:53:14.631]: TRACE: SUB: get-msoluser -ObjectID
>> 0d90a3e2-a4e5-4062-8279-7c8c8a282eaf
>> DirXML: [09/12/14 15:53:14.897]: TRACE: SUB: get-pssession
>> DirXML: [09/12/14 15:53:14.897]: TRACE: SUB: Set-MSolUser -ObjectID
>> 0d90a3e2-a4e5-4062-8279-7c8c8a282eaf -UsageLocation 'US'
>> DirXML: [09/12/14 15:53:15.116]: TRACE: SUB: get-pssession
>> DirXML: [09/12/14 15:53:15.116]: TRACE: SUB: Set-MSolUserLicense
>> -UserPrincipalName 'ao365lictst@kumc.edu' -AddLicenses
>> 'KuMed:OFFICESUBSCRIPTION_STUDENT,KuMed:STANDARDWOFFPACK_STUDENT'
>> DirXML: [09/12/14 15:53:15.381]: TRACE: SUB: Unable to assign this
>> license because it is invalid. Use the Get-MsolAccountSku cmdlet to
>> retrieve a list of valid licenses.
>>
>> I believe the correct syntax should be: Set-MSolUserLicense
>> -UserPrincipalName 'ao365lictst@kumc.edu' -AddLicenses
>> 'KuMed:OFFICESUBSCRIPTION_STUDENT','KuMed:STANDARDWOFFPACK_STUDENT'
>>
>> You see the difference with the additional ticks surrounding the comma
>> that separates the two licenses.
>>
>> This rule is the "Assign Licenses for License Entitlement being granted
>> or revoked, in the NOVLOFFIENTEX-sub-ctp-EntitlementsImpl.Subscriber
>> policy.
>>
>>
>> We also found similar issue with it also trying to duplicate the
>> "UsageLocation" value do to the "for each/do" loop and we would end up
>> with it trying to put "US,US" into UsageLocation, which would throw a
>> syntax error since it is a 2 char destination field. So we moved that
>> rule outside of the "for each/do" loop, so we only get a single "US" as
>> shown above now. But that also seems like a bug with this particular
>> policy.
>>
>> Has anyone else ran into this/fixed it ? or possibly it is a bug that
>> is already known??
>>
>> Set-MsolUserLicense -ObjectId <Guid> [-AddLicenses <string[]>]
>> [-LicenseOptions <LicenseOption[]>] [-RemoveLicenses <string[]>]
>> [-TenantId <Guid>] [<CommonParameters>]
>>
>> This is on a <product edition="Advanced"
>> version="4.0.2.5">DirXML</product> engine
>> driver version: <product build="201309111957"
>> instance="\META-TREE\Services\Dirxml\IDM\Office365"
>> version="4.0.0.2">Identity Manager Driv
>> er for Microsoft Office365</product>
>> eDir 8.8.8 P2 HF1 Binary Version: 20803.05
>>
>> Thanks for any suggestions!
>>
>>

>

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Office365 Problems assigning multiple licenses, single event


I opened an SR for this yesterday as well. Sounds like they are
familiar with the issue. Until they fix the syntax generated
to handle the multiple entitlements, I don't know that there is a
workaround better than what David shared earlier. I'm going to give
that
a shot today.

Paul Kennett;248776 Wrote:
> I am also seeing issues with multiple license entitlements, and have an
> SR
> open. Ostensibly it's for the syntax error with the UserLocation
> parameter,
> but I have worked around that as you suggest by putting it outside the
> loop.
>
> Now I get a different symptom, from the same underlying cause, but I
> thought
> it's worth stating here in case someone else has a similar issue. I
> have
> used 2 Entitlements, 1 is for the OFFICESUBSCRIPTION_STUDENT, but the
> other
> is a *customized* STANDARDWOFFPACK_STUDENT, minus the Lync and
> Exchange.
> I'm getting the -AddLicenses parameter split by the -LicenseOptions
> parameter, so that the OFFFICESUBSCRIPTION part is just tagged on to the
> end
> of the wrong field:
>
> DirXML: [09/15/14 18:02:30.396]: TRACE: SUB:
> et-MSolUserLicense -UserPrincipalName 'o365test23@dom.com'
> -AddLicenses
> 'oursite:STANDARDWOFFPACK_STUDENT' -LicenseOptions
> $oursite_STANDARDWOFFPACK_STUDENT_NoLyncExchange,oursite_OFFICESUBSCRIPTION_STUDENT
>
> Instead of just failing, for some reason this generates a retry:
> <output>
> <status level="retry"
> event-id="dace#20140915170153#5#3:e5733908-ae00-470a-9db0-083973e500ae">
> <message>Exception of type 'DXMLBase.Xds.XdsRetryException' was
> thrown.</message>
> <exception-type>XdsRetryException</exception-type>
> <stack-trace> at
> DXMLMSOnlineDriver.SPSubscriberShim.ExecuteCommand(String cmd)
> at DXMLMSOnlineDriver.SPSubscriberShim.modifyHandler(XdsOperation
> xdsModify, XdsOutput xdsOutput)
> at DXMLMSOnlineDriver.SPSubscriberShim.execute(XmlDocument doc,
> IXmlQueryProcessor query)</stack-trace>
> </status>
> </output>
>
> and round and round it goes........
>
> I'm thinking out loud now, but I wonder whether as a workaround to this
> ill-thought out code, I could create an entitlement for the 2nd license
> that
> depends on the1st being fulfilled. That way, I could force them to hit
> the
> driver 1 at a time. I'll try that later.
>
> regards
>
> Martin
>
>
>
>
>
> "Casper Pedersen" <cpedersen@no-mx.forums.novell.com> wrote in message
> news:xAyRv.6385$BB4.130@novprvlin0913.provo.novell.com...
> > Could I ask you to open a Service Request for this ?
> >
> > The "US,US" issue have been logged as a bug.
> >
> > Thanks,
> >
> > Casper
> >
> >
> > On 9/12/14, 11:33 PM, mmiltenberger wrote:
> >>
> >> working with O365 driver and have ran into a couple glitches when

> trying
> >> to apply multiple licenses to user in a single event/transaction when

> a
> >> user is entitled to / receives multiple licenses. If we separate

> out
> >> the transactions and apply each license, 1 per event/transaction,

> then
> >> it all works just fine. It seems the syntax the driver assembles is

> not
> >> correct for the Set-MSolUserLicense.
> >>
> >> <modify cached-time="20140912205314.654Z" class-name="MSolUser"
> >>

> event-id="meta#20140912205314#1#1:dd3f4a63-884a-489e-3688-634a3fdd4a88"
> >> qualified-src-dn="O=People\OU=Users\CN=ao365lictst"
> >> src-dn="\META-TREE\People\Users\ao365lictst" src-entry-id="151028"
> >> timestamp="1410555194#7">
> >> <association
> >>

> state="associated">0d90a3e2-a4e5-4062-8279-7c8c8a282eaf</association>
> >> <modify-attr attr-name="LicenseAssignment">
> >> <add-value>
> >> <value type="string">KuMed:OFFICESUBSCRIPTION_STUDENT</value>
> >> </add-value>
> >> </modify-attr>
> >> <modify-attr attr-name="LicenseAssignment">
> >> <add-value>
> >> <value type="string">KuMed:STANDARDWOFFPACK_STUDENT</value>
> >> </add-value>
> >> </modify-attr>
> >> <modify-attr attr-name="UsageLocation">
> >> <add-value>
> >> <value type="string">US</value>
> >> </add-value>
> >> <remove-all-values />
> >> </modify-attr>
> >> </modify>
> >> </input>
> >> </nds>
> >> DirXML: [09/12/14 15:53:14.631]: TRACE: SUB: get-pssession
> >> DirXML: [09/12/14 15:53:14.631]: TRACE: SUB: get-msoluser -ObjectID
> >> 0d90a3e2-a4e5-4062-8279-7c8c8a282eaf
> >> DirXML: [09/12/14 15:53:14.897]: TRACE: SUB: get-pssession
> >> DirXML: [09/12/14 15:53:14.897]: TRACE: SUB: Set-MSolUser

> -ObjectID
> >> 0d90a3e2-a4e5-4062-8279-7c8c8a282eaf -UsageLocation 'US'
> >> DirXML: [09/12/14 15:53:15.116]: TRACE: SUB: get-pssession
> >> DirXML: [09/12/14 15:53:15.116]: TRACE: SUB: Set-MSolUserLicense
> >> -UserPrincipalName 'ao365lictst@kumc.edu' -AddLicenses
> >> 'KuMed:OFFICESUBSCRIPTION_STUDENT,KuMed:STANDARDWOFFPACK_STUDENT'
> >> DirXML: [09/12/14 15:53:15.381]: TRACE: SUB: Unable to assign this
> >> license because it is invalid. Use the Get-MsolAccountSku cmdlet to
> >> retrieve a list of valid licenses.
> >>
> >> I believe the correct syntax should be: Set-MSolUserLicense
> >> -UserPrincipalName 'ao365lictst@kumc.edu' -AddLicenses
> >> 'KuMed:OFFICESUBSCRIPTION_STUDENT','KuMed:STANDARDWOFFPACK_STUDENT'
> >>
> >> You see the difference with the additional ticks surrounding the

> comma
> >> that separates the two licenses.
> >>
> >> This rule is the "Assign Licenses for License Entitlement being

> granted
> >> or revoked, in the NOVLOFFIENTEX-sub-ctp-EntitlementsImpl.Subscriber
> >> policy.
> >>
> >>
> >> We also found similar issue with it also trying to duplicate the
> >> "UsageLocation" value do to the "for each/do" loop and we would end

> up
> >> with it trying to put "US,US" into UsageLocation, which would throw

> a
> >> syntax error since it is a 2 char destination field. So we moved

> that
> >> rule outside of the "for each/do" loop, so we only get a single "US"

> as
> >> shown above now. But that also seems like a bug with this

> particular
> >> policy.
> >>
> >> Has anyone else ran into this/fixed it ? or possibly it is a bug

> that
> >> is already known??
> >>
> >> Set-MsolUserLicense -ObjectId <Guid> [-AddLicenses <string[]>]
> >> [-LicenseOptions <LicenseOption[]>] [-RemoveLicenses <string[]>]
> >> [-TenantId <Guid>] [<CommonParameters>]
> >>
> >> This is on a <product edition="Advanced"
> >> version="4.0.2.5">DirXML</product> engine
> >> driver version: <product build="201309111957"
> >> instance="\META-TREE\Services\Dirxml\IDM\Office365"
> >> version="4.0.0.2">Identity Manager Driv
> >> er for Microsoft Office365</product>
> >> eDir 8.8.8 P2 HF1 Binary Version: 20803.05
> >>
> >> Thanks for any suggestions!
> >>
> >>

> >



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

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Office365 Problems assigning multiple licenses, single event

On Wed, 17 Sep 2014 11:26:05 +0000, mmiltenberger wrote:

> I opened an SR for this yesterday as well. Sounds like they are
> familiar with the issue. Until they fix the syntax generated to handle
> the multiple entitlements, I don't know that there is a workaround
> better than what David shared earlier. I'm going to give that
> a shot today.


Note that mine doesn't handle changing licenses, which is another wrinkle
in this. To change the license, without losing anything, you need to
submit the delete and the add within the same Powershell command, but
that doesn't work right now. Fortunately, I don't yet need to change
licenses.

--
--------------------------------------------------------------------------
David Gersic dgersic_@_niu.edu
Knowledge Partner http://forums.netiq.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
Anonymous_User Absent Member.
Absent Member.

Re: Office365 Problems assigning multiple licenses, single event

On Fri, 12 Sep 2014 21:33:13 +0000, mmiltenberger wrote:

> working with O365 driver and have ran into a couple glitches when trying
> to apply multiple licenses to user in a single event/transaction when a
> user is entitled to / receives multiple licenses.


That's essentially impossible to do, as far as I can tell. The driver
will concatenate the licenses together (I suspect this is the XPath node-
set to string conversion), but the shim doesn't know what to do with >1
license in the event. It seems to me that the license management features
in this driver assume that only one change will ever happen at a time. I
think this comes from the RBS/RBE model. I suspect that the entitlements
are single threaded through the driver, so only one change has to be
processed at a time. Here, I'm doing license management without RBS/RBE,
so I wrote my own license management policy to handle what I needed.

I know it's not perfect, but I had work to get done on a deadline and
it's working as needed, so it's good enough for now.

I needed to "add" two license strings to the User being provisioned to
O365. The first is our "student" subscription license. The second is our
Education A2 license, with Exchange and Lync disabled. I created the
"custom license" GCV to hold the "Education A2 / No Exchange / No Lync"
license data. Then this policy does the job:


<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE policy PUBLIC "policy-
builder-dtd" "/home/a02dag1/bin/designer_4.02/plugins/
com.novell.idm.policybuilder_4.0.0.201404231247/DTD/
dirxmlscript4.0.2.dtd"><policy>
<description>Replaces license management / entitlements functionality
from NOVLOFFIENTEX-sub-ctp-EntitlementsImpl without needing the
complexity of Entitlements or the Roles Based Entitlements Driver.</
description>
<rule>
<description>Students: ProPlus</description>
<comment xml:space="preserve">Enable student download of MS Office
software (aka Pro Plus).</comment>
<conditions>
<and>
<if-class-name mode="nocase" op="equal">User</if-class-name>
<if-operation mode="case" op="equal">add</if-operation>
</and>
</conditions>
<actions>
<do-add-dest-attr-value class-name="User" name="LicenseAssignment">
<arg-value type="string">
<token-text xml:space="preserve">niuits:OFFICESUBSCRIPTION_STUDENT</
token-text>
</arg-value>
</do-add-dest-attr-value>
</actions>
</rule>
<rule>
<description>Students: Office OnLine</description>
<comment xml:space="preserve">Enable student Office OnLine (aka Office
365 Education A2 for Students)
Disable Lync (MCOSTANDARD)
Disable Exhange (EXCHANGE_S_STANDARD)</comment>
<conditions>
<and>
<if-class-name mode="nocase" op="equal">User</if-class-name>
<if-operation mode="case" op="equal">add</if-operation>
</and>
</conditions>
<actions>
<do-add-dest-attr-value class-name="User" name="LicenseAssignment"
when="after">
<arg-dn>
<token-op-attr name="CN"/>
<token-text xml:space="preserve">@</token-text>
<token-global-variable name="drv.domain.name"/>
</arg-dn>
<arg-value type="string">
<token-text xml:space="preserve">niuits:STANDARDWOFFPACK_STUDENT
(niuits_STANDARDWOFFPACK_STUDENT)</token-text>
</arg-value>
</do-add-dest-attr-value>
</actions>
</rule>
<rule>
<description>Students: Location</description>
<comment xml:space="preserve">Licenses require a Location.</comment>
<conditions>
<and>
<if-class-name mode="nocase" op="equal">User</if-class-name>
<if-op-attr name="LicenseAssignment" op="available"/>
</and>
</conditions>
<actions>
<do-set-dest-attr-value class-name="User" name="UsageLocation">
<arg-value type="string">
<token-global-variable name="drv.usage.location"/>
</arg-value>
</do-set-dest-attr-value>
</actions>
</rule>
</policy>


The first rule is easy and straightforward. It adds the license. The
second rule is the interesting one. Because the event at this point has
no dest-dn, attempting to use when="after" on an action fails. It seems
that the engine assumes that if there's no dest-dn, then it can't build a
second event, so it just lumps the changes in to the event it already
has. By faking a dest-dn for it to work with, the engine then correctly
builds a following <modify> event to add the additional license. The
driver shim processes the <add> event with the first license, then the
<modify> event with the additional license, and everything is happy.


> If we separate out
> the transactions and apply each license, 1 per event/transaction, then
> it all works just fine. It seems the syntax the driver assembles is not
> correct for the Set-MSolUserLicense.


Yeah, I found that too. I don't know if that's a bug or a feature. I
think there's some work being done in this area in order to handle
license changes, which may be a related problem.


> We also found similar issue with it also trying to duplicate the
> "UsageLocation" value do to the "for each/do" loop and we would end up
> with it trying to put "US,US" into UsageLocation, which would throw a
> syntax error since it is a 2 char destination field.


Yeah, that too. If I've understood the problem correctly, any change to
LicenseAssignment must include the UsageLocation. Since the driver can
only handle one LicenseAssignement change at a time, they blindly tacked
on the UsageLocation to go with it.


--
--------------------------------------------------------------------------
David Gersic dgersic_@_niu.edu
Knowledge Partner http://forums.netiq.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
Anonymous_User Absent Member.
Absent Member.

Re: Office365 Problems assigning multiple licenses, single event


David,

Thanks for the responses, and thanks for sharing your work-around code
for getting past the issue. We may have to do the same in order to meet
our deadlines as well. I think you are spot on in regards to the
license management and entitlements being single threaded. Thanks for
sharing!

dgersic;248694 Wrote:
> On Fri, 12 Sep 2014 21:33:13 +0000, mmiltenberger wrote:
>
> > working with O365 driver and have ran into a couple glitches when

> trying
> > to apply multiple licenses to user in a single event/transaction when

> a
> > user is entitled to / receives multiple licenses.

>
> That's essentially impossible to do, as far as I can tell. The driver
> will concatenate the licenses together (I suspect this is the XPath
> node-
> set to string conversion), but the shim doesn't know what to do with >1
> license in the event. It seems to me that the license management
> features
> in this driver assume that only one change will ever happen at a time.
> I
> think this comes from the RBS/RBE model. I suspect that the
> entitlements
> are single threaded through the driver, so only one change has to be
> processed at a time. Here, I'm doing license management without
> RBS/RBE,
> so I wrote my own license management policy to handle what I needed.
>
> I know it's not perfect, but I had work to get done on a deadline and
> it's working as needed, so it's good enough for now.
>
> I needed to "add" two license strings to the User being provisioned to
> O365. The first is our "student" subscription license. The second is
> our
> Education A2 license, with Exchange and Lync disabled. I created the
> "custom license" GCV to hold the "Education A2 / No Exchange / No Lync"
> license data. Then this policy does the job:
>
> >

Code:
--------------------
> >

> <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE policy PUBLIC "policy-
> builder-dtd" "/home/a02dag1/bin/designer_4.02/plugins/
> com.novell.idm.policybuilder_4.0.0.201404231247/DTD/
> dirxmlscript4.0.2.dtd"><policy>
> <description>Replaces license management / entitlements functionality
> from NOVLOFFIENTEX-sub-ctp-EntitlementsImpl without needing the
> complexity of Entitlements or the Roles Based Entitlements Driver.</
> description>
> <rule>
> <description>Students: ProPlus</description>
> <comment xml:space="preserve">Enable student download of MS Office
> software (aka Pro Plus).</comment>
> <conditions>
> <and>
> <if-class-name mode="nocase" op="equal">User</if-class-name>
> <if-operation mode="case" op="equal">add</if-operation>
> </and>
> </conditions>
> <actions>
> <do-add-dest-attr-value class-name="User" name="LicenseAssignment">
> <arg-value type="string">
> <token-text xml:space="preserve">niuits:OFFICESUBSCRIPTION_STUDENT</
> token-text>
> </arg-value>
> </do-add-dest-attr-value>
> </actions>
> </rule>
> <rule>
> <description>Students: Office OnLine</description>
> <comment xml:space="preserve">Enable student Office OnLine (aka Office
> 365 Education A2 for Students)
> Disable Lync (MCOSTANDARD)
> Disable Exhange (EXCHANGE_S_STANDARD)</comment>
> <conditions>
> <and>
> <if-class-name mode="nocase" op="equal">User</if-class-name>
> <if-operation mode="case" op="equal">add</if-operation>
> </and>
> </conditions>
> <actions>
> <do-add-dest-attr-value class-name="User" name="LicenseAssignment"
> when="after">
> <arg-dn>
> <token-op-attr name="CN"/>
> <token-text xml:space="preserve">@</token-text>
> <token-global-variable name="drv.domain.name"/>
> </arg-dn>
> <arg-value type="string">
> <token-text xml:space="preserve">niuits:STANDARDWOFFPACK_STUDENT
> (niuits_STANDARDWOFFPACK_STUDENT)</token-text>
> </arg-value>
> </do-add-dest-attr-value>
> </actions>
> </rule>
> <rule>
> <description>Students: Location</description>
> <comment xml:space="preserve">Licenses require a Location.</comment>
> <conditions>
> <and>
> <if-class-name mode="nocase" op="equal">User</if-class-name>
> <if-op-attr name="LicenseAssignment" op="available"/>
> </and>
> </conditions>
> <actions>
> <do-set-dest-attr-value class-name="User" name="UsageLocation">
> <arg-value type="string">
> <token-global-variable name="drv.usage.location"/>
> </arg-value>
> </do-set-dest-attr-value>
> </actions>
> </rule>
> </policy>
>

--------------------
> >

>
> The first rule is easy and straightforward. It adds the license. The
> second rule is the interesting one. Because the event at this point
> has
> no dest-dn, attempting to use when="after" on an action fails. It
> seems
> that the engine assumes that if there's no dest-dn, then it can't
> build a
> second event, so it just lumps the changes in to the event it already
> has. By faking a dest-dn for it to work with, the engine then
> correctly
> builds a following <modify> event to add the additional license. The
> driver shim processes the <add> event with the first license, then
> the
> <modify> event with the additional license, and everything is happy.
>
>
> > If we separate out
> > the transactions and apply each license, 1 per event/transaction,

> then
> > it all works just fine. It seems the syntax the driver assembles is

> not
> > correct for the Set-MSolUserLicense.

>
> Yeah, I found that too. I don't know if that's a bug or a feature. I
> think there's some work being done in this area in order to handle
> license changes, which may be a related problem.
>
>
> > We also found similar issue with it also trying to duplicate the
> > "UsageLocation" value do to the "for each/do" loop and we would end

> up
> > with it trying to put "US,US" into UsageLocation, which would throw

> a
> > syntax error since it is a 2 char destination field.

>
> Yeah, that too. If I've understood the problem correctly, any change
> to
> LicenseAssignment must include the UsageLocation. Since the driver
> can
> only handle one LicenseAssignement change at a time, they blindly
> tacked
> on the UsageLocation to go with it.
>
>
> --
> --------------------------------------------------------------------------
> David Gersic
> dgersic_@_niu.edu
> Knowledge Partner
> http://forums.netiq.com
>
> Please post questions in the forums. No support provided via
> email.
> If you find this post helpful, please click on the star below.



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

0 Likes
Highlighted
Anonymous_User Absent Member.
Absent Member.

Re: Office365 Problems assigning multiple licenses, single event

Just thought I'd share the way I've just used to add a second license, which
leverages the technique David Gersic has outlined to force it to deal with
it separately.
However, my method is a hybrid, since I also use entitlements and the RBE
driver to create an main license assignment, and then have the assignment
and de-assignment of the second license simply "piggy-back" on the
entitlement event. It takes 2 GCVs and 2 rules.

GCVs:

<definition display-name="Entitlement to trigger 2nd licence add"
name="drv-trigger-entitlement" type="string">
<description>This is the full name of the entitlement includeing domain,
name, and custom string, that you wish the 2nd licence addition/removel to
be triggered from</description>
<value>[domain]:STANDARDWOFFPACK_STUDENT([Custom name])</value>
</definition>
<definition display-name="Name of 2nd license"
name="drv-second-license-entitlement" type="string">
<description>This is the full name of the entitlement includeing domain,
name, and custom string, that you wish the 2nd licence addition/removel to
be triggered from</description>
<value>[domain]:OFFICESUBSCRIPTION_STUDENT</value>
</definition>

Policy (after NOVLOFFIENTEX-sub-ctp-Entitlements-Impl)

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE policy PUBLIC
"policy-builder-dtd"
"/home/paul/designer/plugins/com.novell.idm.policybuilder_4.0.0.201404231247/DTD/dirxmlscript4.0.2.dtd"><policy>
<rule>
<description>Add Student Office Licence</description>
<conditions>
<and>
<if-global-variable mode="nocase" name="drv.entitlement.License"
op="equal">true</if-global-variable>
<if-operation mode="regex" op="equal">add|modify</if-operation>
<if-class-name mode="case" op="equal">User</if-class-name>
<if-entitlement mode="nocase" name="License"
op="changing-to">$drv-trigger-entitlement$</if-entitlement>
</and>
</conditions>
<actions>
<do-add-dest-attr-value class-name="User" name="LicenseAssignment"
when="after">
<arg-dn>
<token-src-attr name="CN"/>
<token-text xml:space="preserve">@</token-text>
<token-global-variable name="drv.domain.name"/>
</arg-dn>
<arg-value type="string">
<token-global-variable name="drv-second-license-entitlement"/>
</arg-value>
</do-add-dest-attr-value>
</actions>
</rule>
<rule>
<description>Remove Student Office Licence</description>
<conditions>
<and>
<if-global-variable mode="nocase" name="drv.entitlement.License"
op="equal">true</if-global-variable>
<if-operation mode="regex" op="equal">add|modify</if-operation>
<if-class-name mode="case" op="equal">User</if-class-name>
<if-entitlement mode="case" name="License"
op="changing-from">$drv-trigger-entitlement$</if-entitlement>
</and>
</conditions>
<actions>
<do-remove-dest-attr-value class-name="User" name="LicenseAssignment"
when="after">
<arg-value type="string">
<token-global-variable name="drv-second-license-entitlement"/>
</arg-value>
</do-remove-dest-attr-value>
</actions>
</rule>
</policy>

HTH
Paul K

"David Gersic" <dgersic@no-mx.forums.netiq.com> wrote in message
news:bkcjeb-sh6.ln1@wintermute.is.niu.edu...
> On Fri, 12 Sep 2014 21:33:13 +0000, mmiltenberger wrote:
>
>> working with O365 driver and have ran into a couple glitches when trying
>> to apply multiple licenses to user in a single event/transaction when a
>> user is entitled to / receives multiple licenses.

>
> That's essentially impossible to do, as far as I can tell. The driver
> will concatenate the licenses together (I suspect this is the XPath node-
> set to string conversion), but the shim doesn't know what to do with >1
> license in the event. It seems to me that the license management features
> in this driver assume that only one change will ever happen at a time. I
> think this comes from the RBS/RBE model. I suspect that the entitlements
> are single threaded through the driver, so only one change has to be
> processed at a time. Here, I'm doing license management without RBS/RBE,
> so I wrote my own license management policy to handle what I needed.
>
> I know it's not perfect, but I had work to get done on a deadline and
> it's working as needed, so it's good enough for now.
>
> I needed to "add" two license strings to the User being provisioned to
> O365. The first is our "student" subscription license. The second is our
> Education A2 license, with Exchange and Lync disabled. I created the
> "custom license" GCV to hold the "Education A2 / No Exchange / No Lync"
> license data. Then this policy does the job:
>
>

> <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE policy PUBLIC "policy-
> builder-dtd" "/home/a02dag1/bin/designer_4.02/plugins/
> com.novell.idm.policybuilder_4.0.0.201404231247/DTD/
> dirxmlscript4.0.2.dtd"><policy>
> <description>Replaces license management / entitlements functionality
> from NOVLOFFIENTEX-sub-ctp-EntitlementsImpl without needing the
> complexity of Entitlements or the Roles Based Entitlements Driver.</
> description>
> <rule>
> <description>Students: ProPlus</description>
> <comment xml:space="preserve">Enable student download of MS Office
> software (aka Pro Plus).</comment>
> <conditions>
> <and>
> <if-class-name mode="nocase" op="equal">User</if-class-name>
> <if-operation mode="case" op="equal">add</if-operation>
> </and>
> </conditions>
> <actions>
> <do-add-dest-attr-value class-name="User" name="LicenseAssignment">
> <arg-value type="string">
> <token-text xml:space="preserve">niuits:OFFICESUBSCRIPTION_STUDENT</
> token-text>
> </arg-value>
> </do-add-dest-attr-value>
> </actions>
> </rule>
> <rule>
> <description>Students: Office OnLine</description>
> <comment xml:space="preserve">Enable student Office OnLine (aka Office
> 365 Education A2 for Students)
> Disable Lync (MCOSTANDARD)
> Disable Exhange (EXCHANGE_S_STANDARD)</comment>
> <conditions>
> <and>
> <if-class-name mode="nocase" op="equal">User</if-class-name>
> <if-operation mode="case" op="equal">add</if-operation>
> </and>
> </conditions>
> <actions>
> <do-add-dest-attr-value class-name="User" name="LicenseAssignment"
> when="after">
> <arg-dn>
> <token-op-attr name="CN"/>
> <token-text xml:space="preserve">@</token-text>
> <token-global-variable name="drv.domain.name"/>
> </arg-dn>
> <arg-value type="string">
> <token-text xml:space="preserve">niuits:STANDARDWOFFPACK_STUDENT
> (niuits_STANDARDWOFFPACK_STUDENT)</token-text>
> </arg-value>
> </do-add-dest-attr-value>
> </actions>
> </rule>
> <rule>
> <description>Students: Location</description>
> <comment xml:space="preserve">Licenses require a Location.</comment>
> <conditions>
> <and>
> <if-class-name mode="nocase" op="equal">User</if-class-name>
> <if-op-attr name="LicenseAssignment" op="available"/>
> </and>
> </conditions>
> <actions>
> <do-set-dest-attr-value class-name="User" name="UsageLocation">
> <arg-value type="string">
> <token-global-variable name="drv.usage.location"/>
> </arg-value>
> </do-set-dest-attr-value>
> </actions>
> </rule>
> </policy>
>

>
> The first rule is easy and straightforward. It adds the license. The
> second rule is the interesting one. Because the event at this point has
> no dest-dn, attempting to use when="after" on an action fails. It seems
> that the engine assumes that if there's no dest-dn, then it can't build a
> second event, so it just lumps the changes in to the event it already
> has. By faking a dest-dn for it to work with, the engine then correctly
> builds a following <modify> event to add the additional license. The
> driver shim processes the <add> event with the first license, then the
> <modify> event with the additional license, and everything is happy.
>
>
>> If we separate out
>> the transactions and apply each license, 1 per event/transaction, then
>> it all works just fine. It seems the syntax the driver assembles is not
>> correct for the Set-MSolUserLicense.

>
> Yeah, I found that too. I don't know if that's a bug or a feature. I
> think there's some work being done in this area in order to handle
> license changes, which may be a related problem.
>
>
>> We also found similar issue with it also trying to duplicate the
>> "UsageLocation" value do to the "for each/do" loop and we would end up
>> with it trying to put "US,US" into UsageLocation, which would throw a
>> syntax error since it is a 2 char destination field.

>
> Yeah, that too. If I've understood the problem correctly, any change to
> LicenseAssignment must include the UsageLocation. Since the driver can
> only handle one LicenseAssignement change at a time, they blindly tacked
> on the UsageLocation to go with it.
>
>
> --
> --------------------------------------------------------------------------
> David Gersic dgersic_@_niu.edu
> Knowledge Partner http://forums.netiq.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
mdallaire Absent Member.
Absent Member.

Re: Office365 Problems assigning multiple licenses, single event


Is this method still the best way to assign secondary licenses with IDM
Standard?

We have had this configuration in place for some customers and it worked
like a charm, but for the last few months we have had a lot of issues
with secondary licenses where they would not be applied at all.

Mathieu


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

0 Likes
Knowledge Partner
Knowledge Partner

Re: Office365 Problems assigning multiple licenses, single event

On Fri, 23 Oct 2015 12:54:02 +0000, mdallaire wrote:

> Is this method still the best way to assign secondary licenses with IDM
> Standard?


Sorry, the original to which you're replying has scrolled off here. Which
method are you referring to?


> We have had this configuration in place for some customers and it worked
> like a charm, but for the last few months we have had a lot of issues
> with secondary licenses where they would not be applied at all.


Multiple licenses have to be added in multiple events. The driver does
that by default, using entitlements. If you don't use entitlements, you
have to replicate that logic yourself (not hard to do).

What problem are you having? Is the license not be added? Is it being
added, but not working?


--
--------------------------------------------------------------------------
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
Anonymous_User Absent Member.
Absent Member.

Re: Office365 Problems assigning multiple licenses, single event

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?

Paul K

"mdallaire" <mdallaire@no-mx.forums.microfocus.com> wrote in message
news:mdallaire.757u81@no-mx.forums.microfocus.com...
>
> Is this method still the best way to assign secondary licenses with IDM
> Standard?
>
> We have had this configuration in place for some customers and it worked
> like a charm, but for the last few months we have had a lot of issues
> with secondary licenses where they would not be applied at all.
>
> Mathieu
>
>
> --
> mdallaire
> ------------------------------------------------------------------------
> mdallaire's Profile: https://forums.netiq.com/member.php?userid=3112
> View this thread: https://forums.netiq.com/showthread.php?t=51737
>


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

0 Likes
Knowledge Partner
Knowledge Partner

Re: Office365 Problems assigning multiple licenses, single event


Paul Kennett;261979 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?
>


Hi Paul,
Do you see in your traces (engine and RemoteLoader) that you have 2
"separate" events (generated by driver) for this multiple license or you
got only one event?
Could you post your trace? (Trace level 3+. When I debug O365 driver I
use trace level 10)

Alex


--
If you find this post helpful, please show your appreciation by clicking
on the star below :cool:
------------------------------------------------------------------------
al_b's Profile: https://forums.netiq.com/member.php?userid=209
View this thread: https://forums.netiq.com/showthread.php?t=51737

0 Likes
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
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.