Usually you need a proper domain added to O365 (M365) to set up federation with Office 365 / Microsoft 365. Sometimes a hassle in a PoC for prospects as they have to get a proper domain for their Test / Dev MSFT Tenant.
→ But there is a workaround!
Microsoft recently released a feature called “Rename your SharePoint domain” – a long requested feature from the MSFT community. It allows you to add a second *.onmicrosoft.com domain to your Office 365 Tenant. And we can use that to our advantage.
Check out this page from Microsoft on how to configure: https://docs.microsoft.com/en-us/sharepoint/tenant-rename
⚠️ Warning / Caution ⚠️:
→ This is a preview feature!
→ Only the link to the Azure AD Custom Domain blade / config site mentioned on MSFT Docs page made it work for me!
→ You can try it in a PoC, but no guarantee!
Have a look at this demo: