Hi guoye nan,
Thanks for your valuable feedback towards Microsoft Q&A forum and we appreciate for your contribution.
"Both Connect-MSOnline and Connect-MsolService are part of the deprecated MSOnline module, which is no longer being actively updated. While Connect-MsolService is the valid command for authenticating to Microsoft Entra ID (formerly Azure AD) in this module, it is recommended to avoid using the MSOnline module for new development. The Microsoft Graph PowerShell SDK is the preferred, modern alternative, offering more comprehensive, up-to-date features for managing Microsoft Entra ID resources, making it the recommended approach for all new developments.
We'll pass this feedback to our backend team for evaluation, and they’ll update the documentation accordingly.
If you are still facing any issue, please let us know in the comments and where you are encountering this error along with the screenshot for reference. We are glad to help you.
If the information is helpful, please Accept Answer and Upvote so that it would be helpful to community members.