Introduction
We will discuss how to fix the error, New-AzResourceGroup: ‘this.Client.SubscriptionId’ cannot be null while executing the PowerShell cmdlet to retrieve the ResourceGroup Details using the PowerShell ISE
Problem New-AzResourceGroup: ‘this.Client.SubscriptionId
![Soulition for New-AzResourceGroup : ‘this.Client.SubscriptionId’ cannot be null]()
I will provide step by step with solutions screenshots below.
The first thing you need to get is your Azure Subscription ID and Tenant ID. We need to use these two IDs in our PowerShell Script. To get these IDs, follow the below steps
Logged in to the Azure Portal, and search Azure subscription. You will be able to see the Subscription ID as highlighted below. Now copy this ID and keep it with you
Step 1
Copy Azure Subscription ID
![Soulition for New-AzResourceGroup : ‘this.Client.SubscriptionId’ cannot be null]()
![Soulition for New-AzResourceGroup : ‘this.Client.SubscriptionId’ cannot be null]()
Step 2
Copy Tenant ID
![Soulition for New-AzResourceGroup : ‘this.Client.SubscriptionId’ cannot be null]()
![Soulition for New-AzResourceGroup : ‘this.Client.SubscriptionId’ cannot be null]()
Now run the below PowerShell Script to get New-AzResourceGroup the details
Clear-AzContext
Connect-AzAccount -Tenant 5dxxxxx-0310-xxxx-ae8b-vvvvvvv228 -Subscription xxxxxx-dee5-4518-9c9c-xxxxxcbd1
![Soulition for New-AzResourceGroup : ‘this.Client.SubscriptionId’ cannot be null]()
Conclusion
This article taught us how to create a Resource Group in our azure portal. And if you have any questions please contact me.