Access denied when I try to install profiler - dynamics-crm

As the subject says, I am having an issue trying to install profiler through Plugin Registration Tool. I can do all actions on plugins from registration to disabling them. 
I am using Microsoft Dynamics® CRM 2016 (8.1.0.359) (DB 8.1.0.359) On-premises, and Registration tool version is 8.2.1.8676 64bit. 
What I have tried:
I tried tp install profiler in Dev, and staging environment but no luck!
I tried to install it on 100% running plugins and still same issue.
Any idea how to solve this problem or an approach to find the source of the problem?
Note: I am a system administrator and deploy admin too. 
Many thanks,
Unhandled Exception: System.Exception: Solution Import Failed: 31 Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Access is denied.Detail:
<OrganizationServiceFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts">
  <ErrorCode>-2147187707</ErrorCode>
  <ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
  <Message>Access is denied.</Message>
  <Timestamp>2017-10-03T18:53:01.8969526Z</Timestamp>
  <InnerFault>
    <ErrorCode>-2147187707</ErrorCode>
    <ErrorDetails xmlns:d3p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
    <Message>Access is denied.</Message>
    <Timestamp>2017-10-03T18:53:01.8969526Z</Timestamp>
    <InnerFault>
      <ErrorCode>-2147220970</ErrorCode>
      <ErrorDetails xmlns:d4p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
      <Message>System.UnauthorizedAccessException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #D6978376</Message>
      <Timestamp>2017-10-03T18:53:01.8969526Z</Timestamp>
      <InnerFault i:nil="true" />
      <TraceText i:nil="true" />
    </InnerFault>
    <TraceText i:nil="true" />
  </InnerFault>
  <TraceText i:nil="true" />
</OrganizationServiceFault>
   at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.Execute(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode, ExecutionContext executionContext)
   at Microsoft.Crm.Extensibility.InprocessServiceProxy.ExecuteCore(OrganizationRequest request)
   at Microsoft.Crm.Asynchronous.ExecuteSdkMessageOperation.InternalExecute(AsyncEvent asyncEvent)
   at PluginProfiler.Library.ProfilerManagementUtility.ImportSolutionAsyncAndWait(CrmServiceClient service, String prtpath, Boolean publishWorkflows, Boolean overwriteUnmanagedCustomizations, Int32 sleepInterval, Int32 asyncWaitTimeout)
   at PluginProfiler.Library.ProfilerManagementUtility.RetrieveOrCreateProfilerPluginType(CrmServiceClient service, String prtpath)
   at Microsoft.Crm.Tools.Libraries.OrganizationHelper.InstallProfiler(CrmOrganization org, String prtPath)
   at Microsoft.Crm.Tools.PluginRegistration.OrganizationControlViewModel.<>c__DisplayClass27.<InstallProfiler_Clicked>b__1f(Object o, DoWorkEventArgs e)

We were able to solve this thanks to Jens #Dynamics-community
The solution was by modifying the permissions to folder c:\Program Files\Microsoft Dynamics CRM\CustomizationImport.
Detailed answer can be found here: https://community.dynamics.com/crm/f/117/p/253323/710772#710772
Thanks all,

have you tried to downgrade the version of the profiler you are using? Going from 8.1 to 8.2 has quite a big gap on the functionalities that have been changed.
If you are on premise are you sure you have the correct AD groups assigned to your user? Is not enough to insert your user in the deployment admin tab in the deployment manager.

I faced the exact issue, What worked for me is Installing Plugin profiler with Dynamics CRM Solution. You will have a .zip file with name "PluginProfiler.Solution.zip" for plugin profiler. Try importing it and should work.
Let me know if it works for you

Related

Can not get current location Xamarin.Forms

I am using GeoLocator in my Xamarin forms application also implemented Permissions Plugin. But on android locator.GetPositionAsync(TimeSpan.FromSeconds(10)); It shows exception A geolocation error occurred: Unauthorized
Manifest.xml
<uses-sdk android:minSdkVersion="15" android:targetSdkVersion="27" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.SEND_SMS" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
<uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
AssemblyInfo.cs
[assembly: UsesPermission(Android.Manifest.Permission.AccessCoarseLocation)]
[assembly: UsesPermission(Android.Manifest.Permission.AccessFineLocation)]
[assembly: UsesFeature("android.hardware.location", Required = false)]
[assembly: UsesFeature("android.hardware.location.gps", Required = false)]
[assembly: UsesFeature("android.hardware.location.network", Required = false)]
Info.plist
<key>NSLocationWhenInUseUsageDescription</key>
<string>Location access is required to serve you better</string>
<key>NSLocationAlwaysUsageDescription</key>
<string>Location access is required to serve you better</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>Location access is required to serve you better</string>
I was actually trying to solve the same problem today and may have found a solution.
First of all, make sure you install both Permissions and Location plugin into all your projects (including the .NET Standard shared project and platform projects).
Also, I was using the latest beta version, but that seemed to be causing issues and threw the Unauthorized exception even though a direct check resulted in Granted. After installing the stable version (4.5.0.6), it started working as expected.

Change BPF Stage with Workflow Dynamics CRM 2016

We are currently on Dynamics 2016 on premise. We are following this article to set up a workflow to change the Stage on one of our business process flows. The setup of our BPF is below. We are receiving the following error when the BPF runs. I've narrowed this error down to somewhere in the Update Contract Setup Stage step. What are we missing here? Perhaps we are trying to do something only available on D365? Other attempts at changing the stage on a BPF include using the Web API (issues detailed here) and using a trigger to set the database values (yes, we know this is not supported).
Error
Plugin Trace:
[Microsoft.Xrm.Sdk.Workflow: Microsoft.Xrm.Sdk.Workflow.Activities.UpdateEntity]
[UpdateStep3]
Error Message:
Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: An unexpected error occurred.Detail:
<OrganizationServiceFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts">
<ActivityId>bb2e54fb-674a-45b1-a715-3a61722ee875</ActivityId>
<ErrorCode>-2147220970</ErrorCode>
<ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
<Message>An unexpected error occurred.</Message>
<Timestamp>2018-09-27T21:02:20.3406538Z</Timestamp>
<ExceptionRetriable>false</ExceptionRetriable>
<ExceptionSource i:nil="true" />
<InnerFault>
<ActivityId>bb2e54fb-674a-45b1-a715-3a61722ee875</ActivityId>
<ErrorCode>-2147220970</ErrorCode>
<ErrorDetails xmlns:d3p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
<Message>System.NullReferenceException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #66095F59</Message>
<Timestamp>2018-09-27T21:02:20.3406538Z</Timestamp>
<ExceptionRetriable>false</ExceptionRetriable>
<ExceptionSource i:nil="true" />
<InnerFault i:nil="true" />
<OriginalException i:nil="true" />
<TraceText i:nil="true" />
</InnerFault>
<OriginalException i:nil="true" />
<TraceText>[Microsoft.Xrm.Sdk.Workflow: Microsoft.Xrm.Sdk.Workflow.Activities.UpdateEntity]
[UpdateStep3]
</TraceText>
</OrganizationServiceFault>
at Microsoft.Crm.Workflow.Services.UpdateActivityService.Execute(ActivityContext executionContext, UpdateEntity updateEntity)
at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
Workflow Setup
Update Contract Setup Step
I'm not sure if you can do this directly, but i used in the past Dynamics Workflow Tools which have a lot of functions which you can call from a workflow. For BPF Stage you can use "Set Process Stage" Method.

Error registering Plugin Assembly for dynamics 365 crm online

I recently switched computers and had to clone my repo onto a new computer. Everything works fine, I get no build errors or warnings, however, when I go to run SPKL deploy plugins.bat, I get the following error:
I get error Code: -2147220970. Have no idea what that means.. If anyone could guide me on how I could gain back access to spkl as I need it for continuous integration!
Even the plugin registration tool (provided by sdk) shows the following error:
Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: An unexpected error occurred.
Detail: <OrganizationServiceFault xmlns="http://schemas.microsoft.com/xrm/2011/Contracts" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<ActivityId>56924dfd-6d03-4ac1-8e6b-d0341bc81da3</ActivityId>
<ErrorCode>-2147220970</ErrorCode>
<ErrorDetails xmlns:a="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
<Message>An unexpected error occurred.</Message>
<Timestamp>2018-09-15T02:11:55.2459404Z</Timestamp>
<ExceptionRetriable>false</ExceptionRetriable>
<ExceptionSource i:nil="true" />
<InnerFault>
<ActivityId>56924dfd-6d03-4ac1-8e6b-d0341bc81da3</ActivityId>
<ErrorCode>-2147220970</ErrorCode>
<ErrorDetails xmlns:a="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
<Message>System.FormatException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #ED7531F1</Message>
<Timestamp>2018-09-15T02:11:55.2459404Z</Timestamp>
<ExceptionRetriable>false</ExceptionRetriable>
<ExceptionSource i:nil="true" />
<InnerFault i:nil="true" />
<OriginalException i:nil="true" />
<TraceText i:nil="true" />
</InnerFault>
<OriginalException i:nil="true" />
<TraceText i:nil="true" />
</OrganizationServiceFault>
Server stack trace:
at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
at Microsoft.Crm.Tools.Libraries.RegistrationHelper.RegisterAssembly(CrmOrganization org, String pathToAssembly, CrmPluginAssembly assembly)
at Microsoft.Crm.Tools.AssemblyRegistration.PluginRegistrationViewModel.btnregisterClick()
I changed the target framework to 4.5.2 and Microsoft.CrmSdk.CoreAssemblies and and Microsoft.CrmSdk.CoreTools to v8.2.0.2 and v8.2.0.5 respectively and BOOOM, it worked.
I guess you have to keep watch for the versions that the organization is currently using!

CRM 2016 - Ribbon Workbench - Error when Publish Solution: The User ID is Invalid

I am having this error when using RibbonWorkbench (latest version). When I click Publish, the progress dialog show this step: "Importing solution", then after few minutes, it throws this error:
Error when publishing Solution
RBW:3.1.177.1,CRM:8.2.0.749
Import Failed : Unhandled Exception: System.ServiceModel.FaultException [[Microsoft.Xrm.Sdk.osf, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: The user Id(s) [f3acea0e-57f3-4dcf-835a-48603998e79d] is invalid.Detail:
<osf xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts">
<ActivityId>53161f82-3291-4a32-a8ff-306cd84436e8</ActivityId>
<ErrorCode>-2147214049</ErrorCode>
<ErrorDetails xmlns:d2p1="">
<key>
<d2p1:key>0</d2p1:key>
<d2p1:value i:type="d4p1:string">f3acea0e-57f3-4dcf-835a-48603998e79d</d2p1:value>
</key>
</ErrorDetails>
<Message>The user Id(s) [f3acea0e-57f3-4dcf-835a-48603998e79d] is invalid.</Message>
<Timestamp>2017-11-21T07:15:18.3500676Z</Timestamp>
<ExceptionSource i:nil="true" />
<InnerFault i:nil="true" />
<OriginalException i:nil="true" />
<TraceText i:nil="true" />
</osf>
Stack Trace:
Error:
at Function.ClientUI.ViewModel.EditCommandBarsVM.queryImport (:19555:1448)
at :19556:38
I faced this error when publishing any solution/entity. I created a new entity a try to Publish it in RibbonWorkbench, it always show the same error.
The user Id(s) [f3acea0e-57f3-4dcf-835a-48603998e79d] is invalid.
The user GUID is SYSTEM user in our environment.
Could you please show me where should I check this problem? I have googled this error without any result
Thank you very much!

When publishing customisations in CRM 2015 error generating UIData occurs

Here is the error in full:
Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault,
Microsoft.Xrm.Sdk, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]:
Error generating UiDataDetail:
<OrganizationServiceFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://schemas.microsoft.com/xrm/2011/Contracts">
<ErrorCode>-2147200969</ErrorCode>
<ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
<Message>Error generating UiData</Message>
<Timestamp>2015-12-08T16:11:06.2411313Z</Timestamp>
<InnerFault i:nil="true" />
<TraceText i:nil="true" />
</OrganizationServiceFault>
I have checked various solutions to this error. Solutions I have tried are to restart IIS, Restarted the services SQL and CRM, check any workflows are running
This was a process working in the background. Deactivate process, still couldn't publish all customizations from the solution top level, but could then export the solution into UAT which actually worked.

Resources