Issue is this:
Trying to install an Azure Stack Hub (development kit), the installation fails when we try to connect to Azure AD.
We are using the latest setup, Build version 1.2008.0.59.
The command that fails in Powershell is Get-AzureAdTenantDetails, it claims the account is not an administrator in Azure AD:
“Get-AzureAdTenantDetails : The account you entered 'abc.def@X .onmicrosoft.com' is not an
administrator of any Azure Active Directory tenant.”
Here is the thing though, if we run that command in another powershell window (with same account), and load modules manually, the commands works fine (i.e. the account is OK)
Also, if we run the Azure validation tools (https://learn.microsoft.com/sv-se/azure-stack/operator/azure-stack-validate-identity?view=azs-2008&tabs=az),
they work in the powershell we opened manually, however if we try to run that tool in the powershell window that the ASDK installation initiated it fails like this:
Error message:
[Test-AzsServiceAdministrator] Test Test-AzsService[redacted] fail with exception System.Management.Automation.MethodException: Cannot convert argument "redirectUri", with value: "Microsoft.IdentityModel.Clients.ActiveDirectory.UserCredential", for "AcquireToken" to type "System.Uri": "Cannot convert the "Microsoft.IdentityModel.Clients.ActiveDirectory.UserCredential" value of type "Microsoft.IdentityModel.Clients.ActiveDirectory.UserCredential" to type "System.Uri"." ---> System.Management.Automation.PSInvalidCastException: Cannot convert the "Microsoft.IdentityModel.Clients.ActiveDirectory.UserCredential" value of type "Microsoft.IdentityModel.Clients.ActiveDirectory.UserCredential" to type "System.Uri".
Something is fishy with the Azure Stack hub setup, what can we do?
Please advise...