AZSentinel icon indicating copy to clipboard operation
AZSentinel copied to clipboard

Set-AzSentinel: Response status code does not indicate success: 401 (Unauthorized)

Open JaimePolo opened this issue 3 years ago • 1 comments

Environment

Windows build number: 10.0.19042.1083
PowerShell version (if applicable): 7.0.6

Steps to reproduce

#1-Connect to Azure Connect-AzAccount

#2-Set Azure Context Set-AzContext -Subscription 76b3de50-2f93-451e-9482-4e7a23712baf

#3-Create Workspace New-AzOperationalInsightsWorkspace -Location "canadacentral" -Name "SentinelTest" -Sku standard -ResourceGroupName AZR1-RG-LA001

#4-Set Sentinel Set-AzSentinel -SubscriptionId "76b3de50-2f93-451e-9482-4e7a23712baf" -WorkspaceName "SentinelTest"

Expected behavior

Deploy Sentinel

Actual behavior

Set-AzSentinel: Response status code does not indicate success: 401 (Unauthorized).

JaimePolo avatar Jul 20 '21 19:07 JaimePolo

hi @JaimePolo thanks for the feedback. Which permission do you have on the Azure subscription? If it's the first time you are trying to enable Azure Sentinel on the subscription then Owner permission is required because the Azure Resource Provider needs to be activated. please let me know if this fixes your issue?

pkhabazi avatar Aug 02 '21 07:08 pkhabazi