Closed itsjusthaif closed 4 weeks ago
Interesting, I removed it for this reason for Connect-MgGraph
on line 77. But never ran into the issue with Connect-AzAccount
. I suppose I was already authenticated in my tests... I'll check again my env and correct it. Thanks @itsjusthaif for the issue submission!
It actually works for me still, even with the Out-Null
. @briandelmsft do you get similar behavior?
I am fine with removing the Out-Null
here, but I am curious to see what makes the issue not consistent as the whole point of using Azure CLI was to get that level of consistency...
@piaudonn no issues as is on my end, I get both device code prompts and all the permissions get granted without error
@itsjusthaif can you share a screenshot?
Describe the bug The Out-Null parameter found in lines 79, 86, 88 causes an issue where the prompt to sign in does not show up. By running the script with that parameter in place, we get a "Authentication timed out after 120 seconds due to inactivity. Please try again." message. I believe this is cause, the authentication prompt is sent to "NULL" and we never see it in the foreground.
We removed the OUT-NULL parameter and the pipe, the script ran OK and provided us with the login URL and TOTP.
Module Name Name of the STAT Module containing the bug (if known) GrantPermission.ps1 script.
To Reproduce Steps to reproduce the behavior:
Expected behavior Expected for the script to apply all the permissions listed
Screenshots ![Uploading image.png…]()
Additional context Remove the OUT-NULL parameter and the script runs fine.