Step 1: Sign into Office admin portal via http://portal.office.com
Step 2: From the Microsoft 365 admin center dashboard, go to Admin > Exchange.
Step 3: Navigate to Recipients > Mailboxes.
Step 4: Select the user for which you want to enable or disable POP3 or IMAP, and then click Edit icon.
Step 5: In the User Mailbox dialog box, in the console tree, click Mailbox Features.
Step 6: Under Email Connectivity, enable or disable POP3 or IMAP.
Step 7: Click Save.