Azure Runbooks
3 TopicsMethod not found 'Void Microsoft.Graph.TokenCredentialAuthProvider'
Hello, I try to run a runbook in Hybrid Worker to collect info from Azure Registered Apps. For that activity I connect to MS Graph with certificate and execute Get-MgApplication cmdlet. However, I see "Welcome to Microsoft Graph!" response and then: Get-MgApplication : Method not found: 'Void Microsoft.Graph.TokenCredentialAuthProvider..ctor(Azure.Core.TokenCredential, System.Collections.Generic.IEnumerable`1<System.String>)'. At line:24 char:1 + $SApps = Get-MgApplication -all + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Get-MgApplication_List], MissingMethodException + FullyQualifiedErrorId : Microsoft.Graph.PowerShell.Cmdlets.GetMgApplication_List My current version module is 2.0.0-preview5, but I also tried other versions and got different results (but never successful). All cmdlets, including connecting via certificate, can be executed successfully locally and within Azure runbook. I run out of ideas. Any ideas?9.9KViews0likes6CommentsCert not found for Connect-MgGraph via Runbook Hybrid Worker
I use certificate to connect to Microsoft Graph and it works fine in runbooks azure instance. However, when I perform Connect-MgGraph -CertificateThumbprint <certThumbprint>-ClientID "<clientID>" -TenantID "<tenantID>" in runbook for Hybrid Worker machine I'm getting the following error: Connect-MgGraph : Certificate with subject name '[Subject] CN=CertName [Issuer] CN=CertName [Serial Number] CertSN [Not Before] 1/21/2023 1:33:10 PM [Not After] 1/21/2024 1:53:13 PM [Thumbprint] CertificateThumbPrint ' was not found in certificate store or has expired. At line:14 char:1 + Connect-MgGraph -CertificateName $cert -ClientID "<ClientID>- ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Connect-MgGraph], ArgumentException + FullyQualifiedErrorId : Microsoft.Graph.PowerShell.Authentication.Cmdlets.ConnectMgGraph The certificate is found and data is valid, but error says "not found" anyway. I tried to specify the exact path to the certificate and use store, also I switched different graph module version, none of that helped.Solved6.9KViews0likes4CommentsCannot connect to Exchange Online module via Runbook
That's very strange error that I came across a few times on my own workstation, but now I cannot get rid of it on Hybrid Worker machine. My runbook connects to Exchange Online to perform get-mailbox cmdlet, however at the connect-exchangeonline phase I'm getting the following error: "exception": "Could not find file 'C:\\Windows\\TEMP\\a70a8826-0c1f-4902-b1bc-767587023327\\tmpEXO_rj4fdl4e.yzc.psd1'. (Could not find file 'C:\\Windows\\TEMP\\a70a8826-0c3f-4902-b2bc-767587023327\\tmpEXO_rj4fdl4e.yzc.psd1'.)" I tried to uninstall, clean-up, restart, install previous version, nothing helps. Any ideas what could be the reason?Solved2.4KViews0likes3Comments