I am trying to use Microsoft.Xrm.Data.Powershell in my azure automation account powershell runbook.
I have installed the module in automation account.
But when I am trying to connect to my CRM Organisation, I am facing an error.
Command I am using:
Connect-CrmOnline -ClientSecret $csecret -OAuthClientId $cid -ServerUrl $CRMSourceUrl -Verbose
Error I see:
Unable to connect to CRM: Could not load file or assembly 'System.Runtime,
Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its
dependencies. The system cannot find the file specified.
Could not load file or assembly 'System.Runtime, Version=4.2.1.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The
system cannot find the file specified.Unable to Login to Dynamics CRM
Unable to Login to Dynamics CRMOrganizationWebProxyClient is null
OrganizationWebProxyClient is nullOrganizationWebProxyClient is null
OrganizationWebProxyClient is nullOrganizationWebProxyClient is null
OrganizationWebProxyClient is nullOrganizationWebProxyClient is null
OrganizationWebProxyClient is nullOrganizationWebProxyClient is null
OrganizationWebProxyClient is null
Module version I am using is 2.8.14 which is the latest one.
Kindly have a note that I have tried to install the module to automation account by all 3 ways (through uploading zip file, from installing through powershell gallery portal, and from azure portal by browsing through gallery)
But facing issue at the first step for establishing connection.
Also note that the same command, credential etc works fine when I am trying them from my local machine.
I am not sure what is wrong when using the same script in Azure Automation Account Powershell runbook?
Any help regarding this is much more appreciated.
Many thanks in advance
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156