NOTE: If you're authenticating using a Service Principal then it must have permissions to
Windows Azure Active Directory API.
I have created the Azure Active Directory User using the
az command line:
az ad sp create-for-rbac --role="Owner" --scopes=$SubscriptionUrl --name $PrincipalName
However, this doesn't have
Directory.ReadWrite.All permissions, as that would be a fairly insane security risk.
How can I add the
Directory.* permissions to the Service Principal using the
az command line (by preference) or even the Azure Powershell Cmdlets, I would even be willing to craft a WebRequest if that would help me solve the problem!