Help · Troubleshooting
Sign-in problems
What to do about certificate warnings, AADSTS50011, "There's no Mygration account for you", locked accounts, and being locked out after single sign-on broke.
Last updated
Find the message you see, then follow the steps under it. Most of the fixes are made by a Mygration admin under Tenant → Access.
A certificate warning in the browser #
You see: the browser warns that the connection isn't private, or the certificate isn't trusted, when you open the panel.
It depends on how the server does HTTPS (the installer asked):
A free Let's Encrypt certificate: the certificate hasn't been issued yet. On the server, run
sudo mygration doctorand look under Name and HTTPS. Usually the hostname doesn't point at the server yet, or ports 80 and 443 aren't open to it from the internet. Fix that; the certificate follows by itself within a few minutes.sudo mygration logs proxysays why it hasn't been issued.The server's own certificate (for a name used only inside your network): each PC must trust the server's root certificate. Copy it off the server:
sudo docker compose -f /opt/mygration/docker-compose.yml cp proxy:/data/caddy/pki/authorities/local/root.crt mygration-root.crtThen trust it on the staff PCs that use the panel, by Group Policy or Intune. Trust it only on those PCs.
Your own reverse proxy: the certificate is the proxy's. Check it's valid for the panel's hostname.
AADSTS50011 #
You see: Microsoft's sign-in page says AADSTS50011 and that the redirect address doesn't match, when you sign in
with Microsoft or a customer's admin opens a consent link.
The address the panel is at isn't on the app in your Entra tenant.
- Open the panel at the hostname you gave the installer, not another name or its IP address.
- Go to Tenant → Microsoft 365 apps and click Set up automatically again. It adds the right addresses to both apps.
To check by hand, in your own Entra admin center go to App registrations → the app → Authentication.
Under Web, the panel app needs https://<hostname>/signin-oidc, and the Mygration Migration Engine needs
https://<hostname>/auth/consent-callback. Each address goes on its own app.
Moved the panel to a new name? See Moving the panel to a new hostname.
"There's no Mygration account for you" #
You see: Microsoft signed you in, but there's no Mygration account for you. Ask an admin to add you under Tenant → Access.
Microsoft knows the person, but Mygration doesn't. An admin adds them:
- Go to Tenant → Access → Users and click Add user.
- Enter their Email, as they sign in to Microsoft, and their name.
- Pick their role, and their customers (all, or through a team).
- Tick Sign in with Microsoft (single sign-on).
- Click Add user.
They can sign in straight away.
Other messages on the sign-in page #
| You see | What to do |
|---|---|
| Your Mygration account is disabled. Ask an admin. | An admin opens them under Tenant → Access → Users (click their row) and unticks Disabled. |
| Your account signs in with a password here, not with Microsoft. | Sign in with your email and password. To switch them to Microsoft, an admin ticks Sign in with Microsoft (single sign-on) on their account. |
| That Microsoft account isn't the one linked to this Mygration user. | Their Microsoft account changed. An admin opens them and clicks Unlink Microsoft account; their next Microsoft sign-in links again. |
| Single sign-on isn't set up. Sign in with your password. | An admin sets it up under Tenant → Access → Single sign-on. |
| Signing in with Microsoft didn't work. | An admin checks Tenant → Access → Single sign-on and clicks Test the saved settings. If the secret expired, see Renewing the app secrets. |
| Wrong email or password. | Try again. An admin can Reset password on their account, which gives a temporary password they change at first sign-in. |
| Too many wrong attempts. The account is locked until … | Wait until then, or an admin opens their account and clicks Unlock. |
| That code didn't match. | Use the current code from the authenticator app, and check the phone's clock is right. Lost the phone? An admin clicks Reset authenticator on their account, and they set it up again under My settings. |
| Too many attempts from this computer. | Wait a minute and try again. |
| Mygration isn't responding. | The panel isn't running or is restarting (during an update, say). Wait a minute. If it lasts, run sudo mygration status on the server. |
Sign-in goes round in circles #
You see: after signing in with Microsoft you land back on the sign-in page, or Microsoft says the reply address doesn't match, and the panel is behind your own reverse proxy.
The proxy isn't passing on the original address. Set it to pass the Host header, X-Forwarded-Proto: https and
X-Forwarded-For. In nginx:
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
Then sudo mygration doctor warns if the panel still doesn't trust the proxy, and says what to set.
Locked out after single sign-on broke #
You see: nobody can sign in with Microsoft (the staff sign-in app's secret expired, say), and everyone uses single sign-on.
- Sign in with an admin account that uses a password: enter its email and password on the sign-in page, rather than clicking Sign in with Microsoft.
- Fix single sign-on under Tenant → Access → Single sign-on: usually a new client secret. See Renewing the app secrets.
- Click Test the saved settings. Then everyone can sign in again.
Tip
Keep at least one admin who signs in with a password and an authenticator, not single sign-on, for exactly this. See the Security checklist.