Skip to content

Login

 

The Login Block enables users to automate the authentication process required to launch a Dynamics 365 application within Leapwork workflows. This block serves as a foundational element for test automation scenarios targeting D365 environments by providing a standardized way to initiate and log into the system before other operations commence.

Fully expanded, the D365 Login block shows the following properties:

elegance-d365-login-block2

The Block Header ("Login")

The green input connector at the top left triggers the block’s execution when the automation flow reaches this step.

The block title ("Login") can be renamed by double-clicking the header and entering a new label, allowing for more descriptive names within complex flows.

Browser to Start

This dropdown field allows the user to select the browser that will be launched as part of the login sequence.

Web Address (URL)

This input field specifies the D365 application URL that the block will open upon execution.

The URL must lead directly to the intended D365 environment or login endpoint for successful authentication.

Text fields (for URL)

Add any number of fields that can contain dynamic content and be used as tokens in the URL.

Login Method

Specifies the authentication approach used during the login process.
Choose the option that best matches your D365 environment and security requirements:

  • Automated:Credentials and any required authentication steps (including MFA) are handled automatically by Leapwork. Use this option for fully automated login flows where user interaction is not required.
  • Manual:The login process is performed manually by the user during recording or execution. Select this option when additional, interactive steps are needed (such as responding to unexpected prompts or complex MFA scenarios).

Username

Used to input the D365 login username.

Typically, this would be a valid organizational account with sufficient access rights to the targeted D365 application.

Password

Used to input the corresponding password for the username provided.

Sensitive handling is enforced; the password is obscured and securely stored during execution.

OTP Code

Used to input the One-Time Password (OTP) value required for Multi-Factor Authentication (MFA) during automated login. This property is only available when Login Method is set to Automated.

You can either:

  • Manually enter the OTP code generated by your authenticator app, or

  • Connect this field to the output of a TOTP (Time-based One-Time Password) block, allowing Leapwork to automatically supply the OTP code as part of the login sequence.

Note: The OTP Code field and TOTP block work only with authentication services that allow using a secret key,  such as Microsoft Authenticator, Google Authenticator, Duo Security, and Okta.
Okta Verify is not supported in the new Okta Identity Engine, as it no longer allows manual setup with a secret key.
Learn more.

Browser Window

This property identifies the target browser instance for the login process. It is automatically assigned upon execution and is primarily used internally by Leapwork to manage session context. In Early Access versions, only a single browser session is supported, and this setting is not yet configurable.

Default timeout

If the Default Timeout property checkbox is not selected, then the timeout value is 120 seconds. If the property checkbox is selected, then the Default timeout value selected in the flow settings will be applicable.

Timeout

The maximum time spent extracting the specified information before giving up and triggering the Failed connector (see above).

Note: All cases have a “global timeout” that can be configured in the “Settings” panel. This is unrelated to the timeout of a single building block. However, a running case will automatically be cancelled if it runs for longer than the global timeout.

Login Failed

This output property is a flag that gets triggered when the login attempt fails.

It can be used to add conditional branches in your automation flow, allowing alternate actions or retries if authentication does not succeed.

 

Updated 17.12.25