Reputation: 63
I am trying to use "Get-AzureADWHfBKeys" in PowerShell but i am getting the below error
Install-Module -Name WHfBTools -Force Import-Module -Name WHfBTools Install-Module -Name MSAL.PS -RequiredVersion 4.5.1.1 -force Import-Module MSAL.PS Get-AzureADWHfBKeys -Tenant "example" -UserPrincipalName "example
Get-AzureADWHfBKeys info: https://support.microsoft.com/en-us/topic/using-whfbtools-powershell-module-for-cleaning-up-orphaned-windows-hello-for-business-keys-779d1f3f-bb2d-c495-0f6b-9aeb940eeafb
Error:
Failure reason
Redirect URIs with urn: schemes are prohibited. Use a different scheme, or https://login.microsoftonline.com/common/oauth2/nativeclient
Application
Azure Active Directory PowerShell
Application ID
1b730954-1685-4b74-9bfd-dac224a7b894
Resource
Windows Azure Active Directory
Resource ID
00000002-0000-0000-c000-000000000000
Upvotes: 0
Views: 437
Reputation: 8018
Error: Failure reason
Redirect URIs with urn: schemes are prohibited. Use a different scheme, or https://login.microsoftonline.com/common/oauth2/nativeclient: -
According to the above error, it means that you need to use a different redirect URL. To do that, Go to Azure AD >> App registrations
and then find the application with the error message ID (1b730954-1685-4b74-9bfd-dac224a7b894) or the application used for the PowerShell script.
Reconfigure the application to use this https://login.microsoftonline.com/common/oauth2/nativeclient
as the Redirect URI.
Using above mentioned way, I tried to retrieve the keys as you did follow by installing the required modules and was able to get the outcome as expected.
Install-Module -Name WHfBTools -Scope CurrentUser
Import-Module -Name WHfBTools
Install-Module -Name MSAL.PS -RequiredVersion 4.5.1.1 -Scope CurrentUser
Import-Module MSAL.PS
Get-AzureADWHfBKeys -Tenant "<TENANT_ID>" -UserPrincipalName xxxxx
Upvotes: 0