We fall back to guessing based on the realm if the user doesn't have a profile in our system (imported from commit 833885168c451074c885b4422d62986855a215f7)