This is the full version of the wizard in the dashboard. It takes about ten minutes, and costs nothing. You'll copy an application ID and a client secret into JSONPad, and one URL from JSONPad into Microsoft.
If you haven't read it yet, signing in with Google, GitHub and others explains how the whole flow works.
common tenant.Straight back to your app is the default for Microsoft: it allows several Web redirect URIs, including http://localhost with any port, so each of your environments can have its own.
If you pick through JSONPad instead, register this one URL and nothing else:
https://api.jsonpad.io/identities/oauth/callback
The dashboard's Test sign-in always goes through JSONPad's callback URL. To use it with "straight back to your app" mode, add that URL as a redirect URI too.
Microsoft client secrets expire, after at most two years and by default after six months. Sign-ins stop working the day it expires, so note the date now and add a new secret before then.
Microsoft checks the sign-in code before the app, so Save and check can't tell a wrong application ID or secret from a right one (it does report a rejected secret when Microsoft says so). The test sign-in is the real check here.
JSONPad never trusts a Microsoft email address. An administrator can set any address on an account in their own tenant, including someone else's, so treating it as proof would let them take over an identity with that address. (This is the "nOAuth" problem.)
Identities created by signing in with Microsoft have no email address until they add one, and JSONPad matches accounts by Microsoft's own account id instead. If your identity group requires an email address, ask for one in your app.
AADSTS50011The redirect URI doesn't match one registered on the app. They're compared exactly, including the scheme and any trailing slash.AADSTS7000215The client secret is wrong. Check you copied the Value rather than the Secret ID, and that it hasn't expired.AADSTS700016The application ID isn't in this tenant. Check the ID, and the Tenant field in JSONPad.AADSTS50020The account can't sign in to this app: usually a personal account signing in to an app that only allows one organization.AADSTS65001Consent is needed. An administrator can grant it for the whole organization under API permissions.