If the application you are testing is set up for Microsoft multi-factor authentication, follow the steps in this article to allow automation logic to acquire the verification code when the test is running. The login user ID used in your test cases should be configured for MFA authentication as described in this article.
Adding an Authenticator App for the User ID used in the automation logic
1. Log in to Outlook in your browser with the user ID required in automation logic.
2. Click on your Outlook profile icon, then click the "View account" link.
3. Navigate to "Security info"
4. Click "Add sign-in method" and select "Authenticator app" from the dropdown menu.
5. Click the link "I want to use a different authenticator app"
6. Click the "Next" button
7. Click the "Can't scan image?" button
8. Scan the QR code in your preferred authenticator app that supports TOTP-based authentication (e.g., Google Authenticator, Microsoft Authenticator). The new entry added in your preferred authenticator app will start generating a token.
9. Enter the code generated in your authenticator app and click "Next" button
10. If the code entered is correct then you will be back in the "Security info" section with a new entry added as shown in the below image.
This indicates that you have successfully added a new authenticator app(TOTP based Authentication)
Verify TOTP-based Authentication we just added
1. Logout of your Outlook account in your browser and during the next Microsoft Outlook login after entering the username and password, click the "I can't use my Microsoft Authenticator app right now" link
2. Select the "Use verification code" option
3. Enter the code from your authenticator app and click the "Verify" button
If you can successfully login to your Microsoft Outlook account after this point then you are all set
Extracting verification code in Action logic
When the application-under-test is configured to use Microsoft login with multi-factor authentication, you must enter a verification code as part of the login process. When you write the logic for Login Action in ACCELQ, insert statements to find and use the security code as demonstrated below.
In this command, you will utilize the secret key saved in the setup steps. This parameter is encrypted as you type into your Action logic, and hence secure.
In the example below, a typical login process is followed by extracting the verification code and then applying this code in the application field.
Comments
0 comments
Article is closed for comments.