Your Service Principal will need the Contributor role in order to deploy on Azure.
If you take a look at the example PowerShell script we provide in our Azure Service Principal Account guide, you’ll see that we assign “Contributor” for the role definition argument.
It would be helpful if you update the documentation to include that instruction under “Option 2: Use the Azure Portal”, since the Microsoft documentation you link to uses Reader in their examples.