An old “friend” keeps keeps showing up in different environments. So since my old Blog is gone, I will add this again.
But this time I’ll just copy the info from Microsoft’s website.
Thank you Microsoft: https://support.microsoft.com/en-us/help/2020943/-http-400—bad-request-request-header-too-long-error-in-internet-info
This is not a straight forward thing, even do you would think so.
1. Open browser, enter the following: https://account.windowsazure.com/Subscriptions
- Sign inn with your Azure Subscription Owner ID
- Press the Subscription you want to change the name of
- On the right hand side, “Edit Subscription details”
- Enter the new name bellow “ SUBSCRIPTION NAME”
Name is now changed, but you need to give access to the subscription, so that you can use it in your environment.
2. Still in the account.windowsazure.com/subscriptions view
- Press the Portal icon upper right
- Find the subscriptions icon on the left side menu
- Press the subscription you want to give access to
- Press the MSN icon, so you can choose Users
- Press Add
- Choose the access level you want to delegate, and find the user.
Now you can utilize the new subscription in your Azure portal
$encrypted = Get-Content “D:\Scripts\Azure_Encrypted_Password.txt” | ConvertTo-SecureString
When you have a larger organisation, you will have several Azure Subscriptions to work against. So here is how you switch.
1. Open Powershell
2. Type in: Add-AzureRmAccount
(in pop-up enter admin id and password)
3. It will list up the subscription you are connected to when you have authenticated
4. Type in: Get-AzureRmSubscription
(will list out all your subscriptions)
5. Find the Subscription you want to connect to
6. Type in: Select-AzureRmSubscription -SubscriptionId “ENTER THE SUBSCRIPTION ID”
You can choose SubscriptionName too, but I prefere SubscriptionID
I created a resource group and gave my colleague the contributor access to the resources group.
Then he was going to deploy Logic App, but got an error that he does not have access and is not authorized. So he tried to deploy a VM, same issue.
I deployed Logic App for him (not problem).
The error he gets looks like this:
Resource creation fails with the error which looks like below- Registering the resource providers has failed. Additional details from the underlying API that might be helpful: ‘AuthorizationFailed’ – The client firstname.lastname@example.org’ with object id ‘af648edh-5336-sf55-ff2f-14873afdc259’ does not have authorization to perform action ‘Microsoft.Compute/register/action’ over scope ‘/subscriptions/245455vgd4-34gg-afe4-975f-3345gdgs34s’. (Code: AuthorizationFailed)
Hmmmm….. What’s going on here?
With the contributor access to a resource group, you can create a resource e.g. a VM or Logic App. What went wrong here if we look at the error message and focus on ‘Microsoft.Compute/register/action’ over scope ‘/subscriptions/245455vgd4-34gg-afe4-975f-3345gdgs34s’. is that he is not authorized to create a resource, it is the authorization error to register a resource provider. So how do we solve it?
Well after a bit of Googling if found a solution that worked for me,
- Log into Azure with an identity which has a subscription level access to register a resource provider e.g. admin/owner.
- Using PowerShell (PoSh) register the resource providers you need at the subscription level. You can also see which providers are available and registered already.
Open Powershell and enter the following:
#List out all Subscriptions you have access to
– $subscriptionId= “<Subscription Id>”
– Select-AzureRmSubscription -SubscriptionId $subscriptionId
– Get-AzureRmResourceProvider -ListAvailable | Register-AzureRmResourceProvider -Force