Hi,
My power pages is setup to use the Azure AD authentication within my tenant -

Now, we do not want the user to use the default registration method in the the power pages. Instead, they provide their profile information using a multistep form that records the First Name, Last Name and email address in the contact table.
Once an admin approves the contact record (by changing some field status), a power automate is called and a guest account is created for the user in our Azure AD. The user gets an email to set their password in Azure AD. All this is working fine.
We now want the user to use their Azure AD login to access the portal and connect to the existing contact record that was created. For this we made the following setting -

Also, we switched off the "Open Registration" option.

But, when the user then tries to login with the user id and password, we get this error -

But, this starts to work when the "Open Registration" is turned on. But, this is an issue for us as this now allows any one in the Azure AD to log in. We only want the users who are in the Contact table and with corresponding Azure AD guest account to be able to log in to the portal.
Any help is greatly appreciated.