Error when trying to create a Modern site

When I try to create a Modern site with the action in Flow, I'm getting the following error:

"code": "ApplicationResultException",
"message": "Cannot contact web site '' or the web site does not support SharePoint Online credentials.

The response status code is 'Unauthorized'.
The response headers are 'X-SharePointHealthScore=7, X-MSDAVEXT_Error=917656; Access+denied.

I've googled around, and a lot of results say that it's becuase we've disabled legacy protocols in the tenant, which we have indeed.

If this is the cause, is there any other way around this, rather than disabling legacy auth?

Thank you for your help

Hello, Richard.

Unfortunately, in the case of creating modern SP sites, it's impossible: the action requires only custom credential API keys. Legacy authentication should be enabled and for the account used to create an API key, multi-factor authentication should be disabled. Also, when you create the API key, you should use account name in the following format: [email protected] (not [email protected]).