SharePoint Online Error - 'Updates Are Currently Disallowed On GET Request'

Introduction 

 
This blog shows a solution to the SharePoint Online error: ‘Updates are currently disallowed on GET requests'. To allow updates on a GET, set the ‘AllowUnsafeUpdates’ property on SPWeb’ while creating a new app catalog site.
 
Recently, I have created a new E5 personal tenant for my development and testing purposes. I wanted to deploy and test the SPFx component in that tenant, hence I tried to create the App catalog.
 
I directly went to the SharePoint admin center in Office 365 and tried to create a new App catalog site, like the following:
 
SharePoint Online - Error 'Updates Are Currently Disallowed On GET Request'
 
I got the error ‘Updates are currently disallowed on GET requests. To allow updates on a GET, set the ‘AllowUnsafeUpdates’ property on SPWeb’.
 
SharePoint Online - Error 'Updates Are Currently Disallowed On GET Request'
I initially thought that the error is due to some technical glitch. There was no clear reason for the error explained in the message, so I tried to create the App catalog site couple more times, but I had no luck and received the same error.
 
The solution is a bit weird. Since I just created a new tenant, I do not have any site created yet. So I jumped directly to create the app catalog site.
 
Then I created one test site in the tenant.
 
SharePoint Online - Error 'Updates Are Currently Disallowed On GET Request'
 
It worked! I tried to create the App catalog site again, and it worked.
 
SharePoint Online - Error 'Updates Are Currently Disallowed On GET Request'
 
So we need to at least create one site before creating the App catalog. The only concern is that Microsoft should provide a meaningful error message so we won't get confused.
 
Sharing is caring, stay safe. Take care!