@shailesh pathak You can use PowerShell for this purpose which doesn't require a subscription. Refer to the stpes here:
https://learn.microsoft.com/en-us/powershell/azure/active-directory/signing-in-service-principal?view=azureadps-2.0
If you are getting below error while trying to connect to Azure CLI via portal and you don't have a subscription this is expected and there is no workaround for this. There must be a subscription avialable.
As I mentioned earlier, cloud shell requires a storage account to be created in the subscription. If you don't have a subscription, you cannot deploy storage account and use Azure CLI. Below is the resource group and storage account created for Azure CLI in my case:
-----------------------------------------------------------------------------------------------------------
Please "Accept as answer" wherever the information provided helps you to help others in the community.