Using New Outlook on Windows for personal email, calendar, and contact management
If you use Outlook.com, Microsoft 365, Hotmail, or Live email, your IMAP password is the same password you use to sign in to your Microsoft account. There is no separate IMAP password.
If you do not remember the password, go to the Microsoft account recovery page at https://account.live.com/password/reset. Choose “I forgot my password,” enter your email address, and follow the recovery steps. Microsoft may send a verification code to your recovery email address, phone number, or ask security questions.
If you still have access to Outlook on a computer or phone where the account is already signed in, you may be able to continue using the account there while you reset the password. In some cases, saved passwords can also be viewed in your device’s password manager or browser settings if the password was stored previously.
After resetting the password, use the new password when setting up IMAP in Outlook or another email app. Typical Outlook IMAP settings are: IMAP server: outlook.office365.com, port 993, SSL/TLS enabled. SMTP server: smtp.office365.com, port 587, STARTTLS enabled.
If two-step verification is enabled on your Microsoft account, some older email apps may require an app password instead of your normal password. You can create one in your Microsoft account security settings under “Advanced security options.”
If you cannot complete the recovery process because you no longer have access to your recovery phone or email, use Microsoft’s account recovery form at https://account.live.com/acsr. Provide as much information as possible about the account to help verify ownership.
If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.
hth
Marcin