Skip to main content

Outlook App Password Use in Service Suite Tests

    Last reviewed: September 24, 2026

    LogThis legacy article applies only when an Outlook or Microsoft 365 account still allows app passwords for automated Service Suite login flows.

    What changed in tothis yourarticle

    Outlook
    • Prefer accountMicrosoft andGraph, CreateOAuth, or an Appapproved password.test-mail API when available; app passwords should not be the default recommendation.
    • Never
    • store

      To create a newthe app password forin anthe apparticle, screenshots, source control, or device,reusable followsample scripts.

    • Use a dedicated test mailbox and rotate the below steps. You can repeat these steps to create an app password for as many apps or devices as you need.
      1. Goaccording to the >Securitycustomer basicssecurity pagepolicy.

      Validation workflow

      1. Confirm with the Microsoft 365 administrator that app passwords are allowed for the tenant and sign in to your Microsofttest account.
      2. Generate

      Select More security options.

      Under App passwords, select Create a new app password. A newthe app password isoutside generatedAIQ and appearsstore onit your screen.

      Use the above generated App Passwordonly in the approved secret location.

      Run the Service suiteSuite script insteadagainst ofa yournon-production originalmailbox passwordand remove any captured secret from logs.

      ExampleReview code:note: Marked the Outlook app-password approach as legacy/security-sensitive and replaced the long title with a concise scope-focused title.

      Synatx: var mailClient = createMailClient("imap.outlook.com", "test@outlook.com", "App Password" , "IMAP");
       
      var mailClient = createMailClient("imap.outlook.com", "test@outlook.com", "goqigersatrcmexc", "IMAP");
       
      // Here "goqigersatrcmexc" is an app Password generated for an account.

      mailClient.login();
      mailClient.setFromFolder("Inbox");
      log("Access Inbox");
      var lastUnreadMails = mailClient.getLastUnreadMessages(1);
      var url = ""
      for(var i = 0; i < lastUnreadMails.size(); i++){
      //code = lastUnreadMails.get(i);
      url = lastUnreadMails.get(i).getSubject();
      }
      mailClient.logout();
      log(url);

      Last updated: JulySeptember 18,24, 20232026

      If you have any feedback on this topic, please contact us at documentation@appvance.ai.