---
schema_version: "1"
id: 93d3624746522ec24faa64eb128086f57a53271f75c7be8d932d7088dda84afd
title: UserProvisioningLog Class
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_class_userprovisioning_userprovisioninglog.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_userprovisioning_userprovisioninglog.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 2a9cab84a405f4c2e22e8beff027052e819ad2c3b9af9e0df1bd072a4b45dd65
description: Provides methods for writing messages to monitor outbound user provisioning requests.Writes a specific message, such as an error message, to monitor the progress of a user provisioning request.Writes a specific status and message, such a status and detailed error message, to monitor the progress of a user provisioning request.Writes a specific message, such as an error message, to monitor the progress of a user provisioning request associated with a specific user.
---
# UserProvisioningLog Class

Provides methods for writing messages to monitor outbound user provisioning requests.

## Namespace

[UserProvisioning](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_namespace_UserProvisioning.htm "The UserProvisioning namespace provides methods for monitoring outbound user provisioning requests.")

## Example

This example writes the user account information sent to a third-party system for a provisioning request to the UserProvisioningLog object.

String inputParamsStr = 'Input parameters: uprId=' + uprId + ', ​
endpointURL=' + endpointURL + ', adminUsername=' + adminUsername + ', ​
email=' + email + ', username=' + username + ', defaultPassword=' + defaultPassword + ', ​
defaultRoles =' + defaultRoles;
UserProvisioning.UserProvisioningLog.log(uprId, inputParamsStr);

- **[UserProvisioningLog Methods](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_userprovisioning_userprovisioninglog.htm#apex_UserProvisioning_UserProvisioningLog_methods)**

## UserProvisioningLog Methods

The following are methods for UserProvisioningLog. All methods are static.

- **[log(userProvisioningRequestId, details)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_userprovisioning_userprovisioninglog.htm#apex_UserProvisioning_UserProvisioningLog_log_3)**  
    Writes a specific message, such as an error message, to monitor the progress of a user provisioning request.
- **[log(userProvisioningRequestId, status, details)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_userprovisioning_userprovisioninglog.htm#apex_UserProvisioning_UserProvisioningLog_log_2)**  
    Writes a specific status and message, such a status and detailed error message, to monitor the progress of a user provisioning request.
- **[log(userProvisioningRequestId, externalUserId, externalUserName, userId, details)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_userprovisioning_userprovisioninglog.htm#apex_UserProvisioning_UserProvisioningLog_log)**  
    Writes a specific message, such as an error message, to monitor the progress of a user provisioning request associated with a specific user.

### log(userProvisioningRequestId, details)

Writes a specific message, such as an error message, to monitor the progress of a user provisioning request.

#### Signature

public void log(String userProvisioningRequestId, String details)

#### Parameters

- **userProvisioningRequestId**:
    
    Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")
    
    A unique identifier for the user provisioning request.
- **details**:
    
    Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")
    
    The text for the message.

#### Return Value

Type: void

### log(userProvisioningRequestId, status, details)

Writes a specific status and message, such a status and detailed error message, to monitor the progress of a user provisioning request.

#### Signature

public void log(String userProvisioningRequestId, String status, String details)

#### Parameters

- **userProvisioningRequestId**:
    
    Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")
    
    A unique identifier for the user provisioning request.
- **status**:
    
    Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")
    
    A description of the current state. For example, while invoking a third-party API, the status could be invoke.
- **details**:
    
    Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")
    
    The text for the message.

#### Return Value

Type: void

### log(userProvisioningRequestId, externalUserId, externalUserName, userId, details)

Writes a specific message, such as an error message, to monitor the progress of a user provisioning request associated with a specific user.

#### Signature

public void log(String userProvisioningRequestId, String externalUserId, String externalUserName, String userId, String details)

#### Parameters

- **userProvisioningRequestId**:
    
    Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")
    
    A unique identifier for the user provisioning request.
- **externalUserId**:
    
    Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")
    
    The unique identifier for the user in the target system.
- **externalUserName**:
    
    Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")
    
    The username for the user in the target system.
- **userId**:
    
    Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")
    
    Salesforce
    
    ID of the user making the request.
- **details**:
    
    Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")
    
    The text for the message.

#### Return Value

Type: void