Open epellegrom opened 3 years ago
@epellegrom
You can change the version of the OnlineManagementAPI to the latest version in the tool installer task and see if it will work?
@waelhamze - significant changes to the OnlineManagementAPI nuget package have been made in preperation for legacy service decom. A couple of things that are relevant:
@bpevans I am aware of these changes.
Have you tried using the latest version of the OnlineManagement API in the tool installer task? This should still work while we change the implementation to use the latest APIs.
I have also been unable to get "MSCRM Backup Online Instance" to work recently. I am getting a different error "Object reference not set to an instance of an object". I have tried using the latest version, but get the same error.
I have the same issue as @wfemichel. Seems to be some sort of authentication issue. Not really sure what is causing this. I actually downloaded you ps1 scripts directly and called it locally. I got the same error. I'm sure the username and password are correct. They are directly copied from a password manager app and they work when logging into 'https://admin.powerplatform.microsoft.com'
2021-01-18T14:39:48.0185687Z ##[debug]Imported Online Management Module
2021-01-18T14:39:48.0799523Z ##[debug]Entering OnlineInstanceFunctions.ps1
2021-01-18T14:39:48.0827893Z ##[debug]Leaving OnlineInstanceFunctions.ps1
2021-01-18T14:39:48.0993209Z ##[debug]Connecting to API server: https://admin.services.crm4.dynamics.com/
2021-01-18T14:39:48.1622660Z ##[debug]Entering GetCrmInstances - ProcessRecord
2021-01-18T14:39:48.1697420Z ##[debug]Executing GetCrmInstances
2021-01-18T14:39:48.2319227Z ##[debug]Requesting Authentication - Start
2021-01-18T14:39:48.2367921Z ##[debug]Requesting Authority From server - Start
2021-01-18T14:39:48.3158481Z ##[debug]Failed GetCrmInstances - ProcessRecord : 00:00:00.1499129
2021-01-18T14:39:48.3192613Z ##[debug]
2021-01-18T14:39:48.3435229Z ##[debug]Message: The pipeline has been stopped.
2021-01-18T14:39:48.3488340Z ##[debug]Source : System.Management.Automation
2021-01-18T14:39:48.3517806Z ##[debug]Method : _WriteErrorSkipAllowCheck
2021-01-18T14:39:48.3548318Z ##[debug]Date : 1/18/2021
2021-01-18T14:39:48.3602227Z ##[debug]Time : 2:39:48 PM
2021-01-18T14:39:48.3688102Z ##[debug]Error : The pipeline has been stopped.
2021-01-18T14:39:48.3720284Z ##[debug]Stack Trace : at System.Management.Automation.MshCommandRuntime._WriteErrorSkipAllowCheck(ErrorRecord errorRecord, Nullable1 actionPreference) 2021-01-18T14:39:48.3750066Z ##[debug] at System.Management.Automation.MshCommandRuntime.DoWriteError(Object obj) 2021-01-18T14:39:48.3778951Z ##[debug] at System.Security.SecurityContext.Run(SecurityContext securityContext, ContextCallback callback, Object state) 2021-01-18T14:39:48.3812239Z ##[debug] at System.Management.Automation.MshCommandRuntime.WriteError(ErrorRecord errorRecord, Boolean overrideInquire) 2021-01-18T14:39:48.3849265Z ##[debug] at System.Management.Automation.Cmdlet.WriteError(ErrorRecord errorRecord) 2021-01-18T14:39:48.3898581Z ##[debug] at Microsoft.Xrm.OnlineManagementAPI.Auth.AuthManager.ExecuteAuthenticateServiceProcess(PSCredential clientCredentials, X509Certificate2 userCert, UserIdentifier user, PromptBehavior promptBehavior, String tokenCachePath, Nullable
1 TenantId)
2021-01-18T14:39:48.3929110Z ##[debug] at Microsoft.Xrm.OnlineManagementAPI.Auth.AuthManager.~~~~~~~~~~
2021-01-18T14:39:48.6621907Z ##[debug] + CategoryInfo : PermissionDenied: (:) [Get-CrmInstances], NullReferenceException
2021-01-18T14:39:48.6652686Z ##[debug] + FullyQualifiedErrorId : ERROR REQUESTING Token FROM THE Authentication context,Microsoft.Xrm.OnlineManagementAPI .GetCrmInstances
2021-01-18T14:39:48.6695327Z ##[debug]
2021-01-18T14:39:48.6817463Z ##[debug]Script stack trace:
2021-01-18T14:39:48.6932543Z ##[debug]at Get-XrmInstanceByName, C:\hostedtoolcache\windows\MSCRMBuildTools\12.0.37\xRMCIFramework\9.0.0\OnlineInstanceFunctions.ps1: line 14
2021-01-18T14:39:48.6965825Z ##[debug]at
The nuget packages being used in this system were recently updated. The public surface to that nuget package is the PowerShell cmdlets. In previous versions of the cmdlets they were dependent on the DLLs shipped in the nuget. All the cmdlets have been updated to rely on another mechanism as well as redirecting all calls to other power platform endpoints. However the legacy DLLs are still shipped in the nuget and are completely non-functional. This package needs to be re-written to not have dependencies on the DLLs shipped in the OnlineManagementAPI nuget since they no longer work.
Hi,
For a couple of days, we experience an error when we execute the task: "MSCRM Backup Online Instance". We get the error: ##[error]Unable to deserialize the response.
This task is using the: https://www.powershellgallery.com/packages/Microsoft.Xrm.OnlineManagementAPI what I notice is that this library is also updated a couple of days ago, maybe it is related?
Many thanks already!
Regards, Erik