DCToolbox
DCToolbox copied to clipboard
Connect-DCMSGraphAsDelegated not connecting
It seems that a CA policy backup is currently not possible with the current version 1.0.39 of DCToolbox; the function Connect-DCMSGraphAsDelegated is missing the Get-AuthCode call. Even if I add that in, the export will fail with error 403. Is that a known issue, am I supposed to be doing something differently than calling Export-DCConditionalAccessPolicyDesign with my application ID and secret?
I too am receiving a null index array error when trying to export the CA policies.
Same here, the problem is that version 1.0.39 is missing a call to function Get-AuthCode in line 1007
Before (working) ` >> # Get AuthCode.
$Url = "https://login.microsoftonline.com/common/oauth2/authorize?response_type=code&redirect_uri=$RedirectUriEncoded&client_id=$ClientID&resource=$ResourceEncoded&prompt=admin_consent&scope=$ScopeEncoded" Get-AuthCode`
Now (not working)
Get AuthCode.
$Url = "https://login.microsoftonline.com/common/oauth2/authorize?response_type=code&redirect_uri=$RedirectUriEncoded&client_id=$ClientID&resource=$ResourceEncoded&prompt=admin_consent&scope=$ScopeEncoded" `
Also getting "Connect-DCMsGraphAsDelegated : Cannot index into a null array." :(
Also getting "Connect-DCMsGraphAsDelegated : Cannot index into a null array." after updating to v1.0.39.
If we can't get a fix here can you re-post v1.0,29 which worked correctly, or explain how we can un-update our DCToolbox version?
BTW happy to see this post, I have spent the last month thinking this is my problem and how I might fix it.
I can also confirm this is happening, doesnt seem like I can use the tool at all any more.
New-DCConditionalAccessPolicyDesignReport @Parameters
VERBOSE: Connecting to Microsoft Graph...
Connect-DCMsGraphAsDelegated : Cannot index into a null array.
At C:\Program Files\WindowsPowerShell\Modules\DCToolbox\1.0.39\DCToolbox.psm1:3159 char:20
Uninstall-Module DCToolbox Install-Module DCToolbox -RequiredVersion 1.0.29
This allowed me to connect and use version 1.0.29 rather than the latest release.
After the uninstall/reinstall to the 1.0.29 version, it's now looking like it's connecting to graph. But now I'm running into an issue where it just keeps cycling the login/picking an account. Anyone run into that or is that a me problem?
I can confirm that with 1.0.39 the Connect-DCMsGraphAsDelegated ends up with a NULL array and 1.0.29 is not working for me either because it requires some additional admin permissions, but the message does not explain which and where, afterwards it loops back to the selection window as mentioned by @brucemspencer.