Hi Jairo,
I've been having the exact same issue since today, and came across your post. I've since discovered why we were getting that error message, so thought id let you know in case yours is the same issue.
We've been using a service account for credentials that in turn was using the PnP Management Shell application in Azure.
I updated PnP PowerShell module to the latest and it then gave a much better description of the issue when trying to connect:
As of September 9th, 2024 the option to use the PnP Management Shell app registration for authentication is not available anymore. Refer to https://pnp.github.io/powershell/articles/registerapplication.html on how to register your own application.
So looks like we'll need to register our own Entra ID Application to use with PnP PowerShell instead.
And use something like this:
Connect-PnPOnline -Url $AdminCenterURL -ClientId $ClientID -ClientSecret $ClientSecret