4

We are working with providing additional information about the type of license for our end to end logging and monitoring tool Nodinite. We have a problem identifying definition for the LicenceType Enum?

Microsoft documentation does not provide any values for the enum:

https://learn.microsoft.com/en-us/dynamics365/customer-engagement/developer/entities/systemuser#BKMK_UserLicenseType

/// <summary>
/// Type of license, such as Professional, Standard, or Suite.
/// </summary>
[Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("licensetype")]
public System.Nullable<System.Guid> LicenseType
{
    get
    {
        return this.GetAttributeValue<System.Nullable<System.Guid>>("licensetype");
    }
    set
    {
        this.OnPropertyChanging("LicenseType");
        this.SetAttributeValue("licensetype", value);
        this.OnPropertyChanged("LicenseType");
    }
}

These are the unique values for the users in the Dynamics 365 (CRM) instance UserLicenseType: -1, 3, 6, 7, 11, 20, 30

1 Answers1

4

You can use fetchxml to query the stringmap table in XrmToolBox - FetchXML builder. Check the caltype in MS documentation. userlicensetype is just mentioned as Edm.Int32.

You can pull this information from customizations as well under systemuser entity - attributes. userlicensetype is just a wholenumber - probably filled in from O365 portal when you assign license.

<fetch>
  <entity name="stringmap" >
    <attribute name="attributevalue" />
    <attribute name="attributename" />
    <attribute name="value" />
    <filter type="and" >
      <condition attribute="objecttypecode" operator="eq" value="8" />
      <filter type="and" >
        <condition attribute="attributename" operator="eq" value="caltype" />
      </filter>
    </filter>
  </entity>
</fetch>

enter image description here

Interesting data from our CRM:

enter image description here

  • When I say “whole number” it’s not an enumerator or picklist (optionset), so we cannot find those values. Also MS documentation not clearly stating about that unique values. We can comment on MS github to update the documentation to reflect the key:value combination of userlicensetype. – Arun Vinoth-Precog Tech - MVP Feb 19 '19 at 03:28
  • 1
    Opened a new github issue: https://github.com/MicrosoftDocs/dynamics-365-customer-engagement/issues/795 – Arun Vinoth-Precog Tech - MVP Feb 19 '19 at 04:06
  • 1
    Thanks for opening the ticket. I managed to add the other information to the [Monitoring Agent](https://documentation.nodinite.com/Documentation/LoggingAndMonitoring%2FMicrosoft%20Dynamics%20365?doc=/Features/Monitoring%20Dynamics%20365) that was needed using your answer above. – Michael Olsson Feb 19 '19 at 14:49