Open ibutbul1 opened 8 months ago
@ibutbul1 could you please provide the debug information. i.e. Connect-MgGraph -ClientId $AppIdForGraph -TenantId $TenantId -CertificateThumbprint $CertificateThumbprint.Thumbprint -Debug
.
Connect-MgGraph : A command that prompts the user failed because the host program or the command type does not support user interaction. The host was attempting to request confirmation with the following message: The type initializer for 'Azure.Core.Pipeline.DiagnosticScopeFactory' threw an exception.
From: Tim @.> Sent: Tuesday, December 5, 2023 17:27 To: microsoftgraph/msgraph-sdk-powershell @.> Cc: Itzhak Butbul @.>; Mention @.> Subject: [!EXTERNAL!] Re: [microsoftgraph/msgraph-sdk-powershell] Azure Automation Runbook - The type initializer for 'Azure.Core.Pipeline.DiagnosticScopeFactory' threw an exception. (Issue #2478)
@ibutbul1https://github.com/ibutbul1 could you please provide the debug information. i.e. Connect-MgGraph -ClientId $AppIdForGraph -TenantId $TenantId -CertificateThumbprint $CertificateThumbprint.Thumbprint -Debug.
— Reply to this email directly, view it on GitHubhttps://github.com/microsoftgraph/msgraph-sdk-powershell/issues/2478#issuecomment-1841019387, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AYDL3HMCPUNEN2IEXUSYMVTYH44MRAVCNFSM6AAAAABAHTY3RWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBRGAYTSMZYG4. You are receiving this because you were mentioned.Message ID: @.***>
The information contained in this email, including any attachments, may be privileged, confidential or protected by intellectual property rights, and is for the intended recipient only. If you have received this email in error, please notify the sender immediately and remove it from your system.
@ibutbul1 I was asking if it's possible to add -Debug
parameter so that we can be able to see the verbose information concerning the error.
@timayabi2020 it's happening to me the same on my local machine: even adding the debug parameter, the error is the same, no extra details....I also tried to downgrade to 2.9.1, no effects.
solved it for me, doing Disconnect-PnPOnline
before the connect-mggraph
.
I had this error come up with in my script, where both PnP.Powershell and MS Graph API modules are being called. Unfortunately the fix of "Disconnect-PnPOnline" did not work for me. But the workaround fix created by @TobiasAT on PnP Bug #3637 (linked below) resolved the problem for me.
Describe the bug
To Reproduce Steps to reproduce the behavior:
The type initializer for 'Azure.Core.Pipeline.DiagnosticScopeFactory' threw an exception.
Expected behavior
Module Version Hybrid Worker - 1.27.0 Azure Automation Account - 2.10
Environment Data