Shared mailboxes in Microsoft 365 usually don’t have a password. Use bulk add to connect one without signing in as the shared mailbox.
Connect the shared mailbox
Section titled “Connect the shared mailbox”Sign in once with a Microsoft 365 admin account and choose the shared mailbox from your list of mailboxes. See How do I bulk add Microsoft 365 mailboxes?