A cloud-based identity and access management service for securing user authentication and resource access
This error is due to the fact that your account does not have a valid MS 365 License, please check whether your account is licensed in Azure, if not, try purchasing or free trial MS 365 license for your tenant, then go to Azure AD and grant that license to the logged in user.
Hope this helps.
If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.