Product: PowerShell Universal
Version: 5.0.8
Hi,
I´m new to Powershell Universal and we are in a POC with version 5.0.8 on IIS at the moment.
We have a problem to connect with AzureAD. Please take a look:
Import-Module AzureADPreview
# Variable
$CredAAD = $secret:SCAAD
Connect-AzureAD -credential $CredAAD
Error information:
One or more errors occurred.
Response status code does not indicate success: 404 (NotFound). 
One or more errors occurred.
You must call the Connect-AzureAD cmdlet before calling any other cmdlets.
The module AzureADPreview is installed and we use PS5.1 as Environment.
When i test it outside of powershell universal, it is possible to connect to Azure AD over ISE.
We also tried a web request in the same script and it works fine:
Invoke-WebRequest -Uri https://adminwebservice.microsoftonline.com/ProvisioningService.svc
Result:
StatusCode        : 200
StatusDescription : OK
Content           : <HTML><HEAD><STYLE type="text/css">#content{ FONT-SIZE: 
                    0.7em; PADDING-BOTTOM: 2em; MARGIN-LEFT: 
                    30px}BODY{MARGIN-TOP: 0px; MARGIN-LEFT: 0px; COLOR: 
                    #000000; FONT-FAMILY: Verdana; BACKGROUND-COLOR: wh...
RawContent        : HTTP/1.1 200 OK
                    Strict-Transport-Security: max-age=31536000; 
                    includeSubDomains
                    X-Content-Type-Options: nosniff
                    Content-Length: 6437
                    Content-Type: text/html; charset=UTF-8
                    Date: Fri, 11 Oct 2024 0...
Forms             : {}
Headers           : {[Strict-Transport-Security, max-age=31536000; 
                    includeSubDomains], [X-Content-Type-Options, nosniff], 
                    [Content-Length, 6437], [Content-Type, text/html; 
                    charset=UTF-8]...}
Images            : {}
InputFields       : {}
Links             : {@{innerHTML=http://go.microsoft.com/fwlink/?LinkId=65455; 
                    innerText=http://go.microsoft.com/fwlink/?LinkId=65455; 
                    outerHTML=<A href="http://go.microsoft.com/fwlink/?LinkId=6
                    5455">http://go.microsoft.com/fwlink/?LinkId=65455</A>; 
                    outerText=http://go.microsoft.com/fwlink/?LinkId=65455; 
                    tagName=A; 
                    href=http://go.microsoft.com/fwlink/?LinkId=65455}}
ParsedHtml        : System.__ComObject
RawContentLength  : 6437
I could not find any solution yet.
I would be grateful for your help.
Best regards
Marco
 I should have provided the complete domain in the secret, “
 I should have provided the complete domain in the secret, “