Why your own app?
WireShock connects to Outlook over IMAP and SMTP with OAuth, so it never needs your Microsoft password. With an app you register yourself, Microsoft grants access to your app, for your own mailboxes: there's no shared WireShock app holding access to everyone's mail, and you can revoke yours at any time.
Steps
Open App registrations
Sign in to the Microsoft Entra admin center with any Microsoft account (it doesn't have to be the mailbox you're connecting). Open App registrations and click New registration.
Entra IDApp registrationsNew registration
App registrations live in a Microsoft Entra directory. Work and school accounts already have one. If you sign in with a personal account and Microsoft says you don't have access, it will offer to set up a directory for you first, for example through a free Azure account.
Register the app
Register an applicationentra.microsoft.comNameWireShock MailSupported account typesSingle tenant onlyAny organizational directory onlyAccounts in any organizational directory and personal Microsoft accountsPersonal accounts onlyRedirect URI: platformWebRedirect URIhttps://app.wireshock.com/api/oauth/microsoft/callback- Accounts in any organizational directory and personal Microsoft accounts lets both Outlook.com and Microsoft 365 mailboxes sign in.
- The platform must be Web, and the redirect URI must match exactly:
https, no trailing slash.
Click Register.
Create a client secret
Open Certificates & secrets, choose Client secrets, then New client secret. Give it a description such as WireShock, pick an expiry, and click Add.
Certificates & secretsClient secretsNew client secret
Copy the secret's Value now, not the Secret ID. Microsoft shows it only once. Note the expiry date too: when the secret expires, WireShock can't refresh its access until you add a new one.
Add API permissions
Open API permissions, click Add a permission, choose Microsoft Graph, then Delegated permissions. Search for and tick these three, then click Add permissions.
Delegated permissionsoffline_accessIMAP.AccessAsUser.AllSMTP.SendIMAP.AccessAsUser.All reads and manages your mail over IMAP; SMTP.Send sends it; offline_access keeps WireShock connected without asking you to sign in again. They belong to Exchange Online, and WireShock requests them as
https://outlook.office.com/IMAP.AccessAsUser.Allandhttps://outlook.office.com/SMTP.Send. If they aren't listed under Microsoft Graph, look under APIs my organization uses, Office 365 Exchange Online.Copy the client ID
Go to Overview and copy the Application (client) ID. Together with the secret from step 3, that's all WireShock needs.
WireShock Mail · OverviewApplication (client) ID1b2c3d4e-5f60-4a7b-8c9d-0e1f2a3b4c5dYou don't need the Directory (tenant) ID, unless you registered the app as single-tenant for one organization (see the next step).
Connect in WireShock
In WireShock, add an account and choose Outlook / Microsoft 365. Paste the client ID and client secret, leave Tenant as
common, and click Connect.WireShock · Add Outlook accountClient ID1b2c3d4e-5f60-4a7b-8c9d-0e1f2a3b4c5dClient secret••••••••••••••••••••Tenantcommoncommonis the default and works for both personal Outlook.com and Hotmail accounts and work or school accounts. Only enter a specific Directory (tenant) ID if you registered the app as single tenant for one organization; personal accounts then won't be able to sign in.Microsoft opens its sign-in page. Choose the mailbox to connect, review the permissions and click Accept. You'll land back in WireShock with your mail syncing. WireShock stores the secret and Microsoft's tokens encrypted with a key unique to your account.
Work and school accounts
Many organizations only let users approve apps that an administrator has reviewed. If Microsoft shows Need admin approval, ask your IT admin to grant consent for your app. They can do it from API permissions with Grant admin consent if the app lives in your organization's directory, or under Enterprise applications for an app registered elsewhere.
Microsoft 365 also lets admins switch off IMAP or authenticated SMTP per mailbox or for the whole organization. If they're off, WireShock can't connect until your admin turns them on for you.
Self-hosted servers
Running your own WireShock server? Follow the same steps, with your server's address in the Web redirect URI:
https://<your-domain>/api/oauth/microsoft/callbackYour instance shows the exact URI to copy when you add the account, and stores the secret and tokens encrypted with its master key. One app registration can hold several redirect URIs, so the same app can serve app.wireshock.com and your own server.
Troubleshooting
AADSTS50011: the redirect URI doesn't match
The redirect URI in your app registration doesn't exactly match the one WireShock uses. Open Authentication and make sure the Web platform lists exactly:
https://app.wireshock.com/api/oauth/microsoft/callback
On a self-hosted server, use https://<your-domain>/api/oauth/microsoft/callback. If you added the URI under Single-page application by mistake, remove it and add it under Web.
AADSTS7000215 or AADSTS7000222: invalid or expired client secret
The secret is wrong (often the Secret ID was pasted instead of its Value) or it has expired. Create a new client secret, paste its Value into the account's settings in WireShock, then delete the old one.
"The client does not exist or is not enabled for consumers"
You're signing in with a personal Outlook.com account, but the app only accepts work or school accounts. Register a new app and choose Accounts in any organizational directory and personal Microsoft accounts. (Microsoft often won't let you change this setting on an existing app.)
Also check that the client ID you pasted is the Application (client) ID, not the Directory (tenant) ID or Object ID.
AADSTS50020 or AADSTS9000411: the account isn't in the tenant
The account you signed in with doesn't belong to the directory WireShock is signing in through. Set Tenant back to common in the account's settings in WireShock, and check that the app's supported account types are Accounts in any organizational directory and personal Microsoft accounts. A specific tenant ID only works for accounts in that one organization.
"Need admin approval" or AADSTS65001
Your organization requires an administrator to approve the app. See Work and school accounts.
Sending fails with "SmtpClientAuthentication is disabled"
Microsoft 365 turns off authenticated SMTP for many organizations. An admin can enable Authenticated SMTP for your mailbox in the Microsoft 365 admin center (under the user's Mail settings, Manage email apps). Outlook.com personal accounts aren't affected.
Microsoft occasionally renames menus in the Entra admin center. If a label here doesn't match what you see, the steps and values still apply. Tell us and we'll update the guide. Last checked 30 November 2026.