RetrieveUserLicenseInfoRequest RetrieveUserLicenseInfoRequest RetrieveUserLicenseInfoRequest RetrieveUserLicenseInfoRequest Class


Contains the data needed to retrieve the license information for the specified system user (user).

For the Web API use the RetrieveUserLicenseInfo Function.

public ref class RetrieveUserLicenseInfoRequest sealed : Microsoft::Xrm::Sdk::OrganizationRequest
public sealed class RetrieveUserLicenseInfoRequest : Microsoft.Xrm.Sdk.OrganizationRequest
type RetrieveUserLicenseInfoRequest = class
    inherit OrganizationRequest
Public NotInheritable Class RetrieveUserLicenseInfoRequest
Inherits OrganizationRequest


The following example shows how to use this message. For this sample to work correctly, you must be connected to the server to get an IOrganizationService interface.

// Get the ID of the current user.
        var whoAmI = new WhoAmIRequest();
        Guid currentUserId =((WhoAmIResponse)svc.Execute(whoAmI)).UserId;
    Console.WriteLine("User logged: " + currentUserId);

// Retrieve the license info for the user. var userLicenseRequest =new RetrieveUserPrivilegesRequest(); userLicenseRequest.SystemUserId = currentUserId;

var userLicenseResponse =(RetrieveUserLicenseInfoResponse)svc.Execute(userLicenseRequest); foreach (var license in userLicenseResponse) { // Perform required operations }


Message Availability

This message works regardless whether the caller is connected to the server or offline.


Pass an instance of this class to the Execute(OrganizationRequest) method, which returns an instance of RetrieveUserLicenseInfoResponse.

Privileges and Access Rights

To perform this action, the caller must have access rights on the record specified in the SystemUserId property.


RetrieveUserLicenseInfoRequest() RetrieveUserLicenseInfoRequest() RetrieveUserLicenseInfoRequest() RetrieveUserLicenseInfoRequest()

Initializes a new instance of the RetrieveUserLicenseInfoRequest class.


ExtensionData ExtensionData ExtensionData ExtensionData

Gets or sets the structure that contains extra data. Optional.

(Inherited from OrganizationRequest)
Item[String] Item[String] Item[String] Item[String]

Gets or sets the indexer for the Parameters collection.

(Inherited from OrganizationRequest)
Parameters Parameters Parameters Parameters

Gets or sets the collection of parameters for the request. Required, but is supplied by derived classes.

(Inherited from OrganizationRequest)
RequestId RequestId RequestId RequestId

Gets or sets the ID of an asynchronous operation (system job). Optional.

(Inherited from OrganizationRequest)
RequestName RequestName RequestName RequestName

Gets or sets the name of the request. Required, but is supplied by derived classes.

(Inherited from OrganizationRequest)
SystemUserId SystemUserId SystemUserId SystemUserId

Gets or sets the ID of the system user to retrieve license for.

Applies to