Sign-in Error When Generating an Invoice
Applies to: Work 365 for Dynamics 365 / Power Platform | Audience: System Administrators, Billing Users
Overview
When you click Generate Invoice in Work 365 and get redirected to a Microsoft sign-in page—or you’re stuck in a sign-in loop—the cause is almost always multiple active Microsoft work/school sessions in the same browser profile. Microsoft Entra ID (formerly Azure AD) can’t reliably pick the right session, so auth bounces.
Symptoms
Generate Invoice opens a Microsoft sign-in page instead of creating the invoice.
A Choose an account screen appears with several work accounts.
The page loops back to sign-in or never completes.
Root Cause
Your browser holds session cookies for multiple tenants/accounts. When Work 365 triggers authentication, Entra ID can’t resolve which session to use and returns you to sign-in.
Fixes (pick one)
✅ Workaround 1 — Use a Private/Incognito Window (recommended)
Open a private session:
Chrome/Edge:
Ctrl+Shift+N| Firefox:Ctrl+Shift+P
Browse to your Dynamics 365 / Work 365 URL.
Sign in with the correct work account for your tenant.
Retry Generate Invoice.
Private sessions isolate cookies, giving you a clean Entra ID login.
? Workaround 2 — Select/clean the correct account in your current session
In the same browser profile, go to Work 365 → Billing Contracts (or Invoicing).
Click Generate Invoice (or the Work 365 icon if prompted).
On Choose an account:
Select the correct work account for your tenant, or
Click the ⋯ next to unused accounts and choose Forget this account.
Complete sign-in, then confirm Work 365 → Administration → Configuration loads without prompts.
Optional Cleanup (if loops persist)
Sign out everywhere: Sign out from Microsoft web apps in that profile, then sign back in with the correct account.
Clear only Microsoft auth cookies: Remove cookies for
login.microsoftonline.comandaccounts.microsoft.com, then retry.Use separate browser profiles: Keep one profile per tenant/role to avoid cross-tenant sessions.
Disable conflicting extensions: Privacy or SSO helpers can interfere—test with extensions off.
Prevention & Best Practices
One account per browser profile.
Prune old accounts from the Microsoft login list before billing tasks.
Dedicated service identity: Run invoicing, sync, and jobs under a Work 365 service/application user.
Default to Incognito for admin work across tenants.
Notes
This is a multi-account Entra ID session issue, not a Work 365 invoicing defect.
After a successful sign-in, the browser typically reuses the correct credentials for the rest of that session.