Answered by:
Creating Organization in CRM 2011 using deployment.svc

Question
-
Hi All,
I've seen a few people have faced problems while creating an organization using Deplyoment wcf service. I'm getting the following error :
The Deployment Service cannot process the request because one or more validation checks failed
The trace on Deployment server gives me the following error :
>ExistingRSValidator, result: Level=Success, Description=
[2011-08-31 14:51:53.869] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread: 27 |Category: Deployment.Sdk |User: 00000000-0000-0000-0000-000000000000 |Level: Info | DeploymentRequestChecker.Validate
>SrsExtensionsValidator: Id=d3615403-c367-42b3-a6e1-e469b8c5a358, PrereqCheckId=3a2479df-ca0e-428b-87f5-3764586cd37f
[2011-08-31 14:51:53.869] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread: 27 |Category: Reports |User: 00000000-0000-0000-0000-000000000000 |Level: Verbose | ReportServer.get_IsWorkgroupEdition
>Calling ReportingService.FindItems to find Folder: 1b197983aff4445b96f41d47158fb586_MSCRM.
[2011-08-31 14:51:54.119] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread: 27 |Category: Reports |User: 00000000-0000-0000-0000-000000000000 |Level: Verbose | SrsExtensionsValidator.InternalCheck
>Calling ReportingService.ListExtensions to get Data extensions
[2011-08-31 14:51:54.135] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread: 27 |Category: Reports |User: 00000000-0000-0000-0000-000000000000 |Level: Verbose | SrsExtensionsValidator.InternalCheck
>Calling ReportingService.ListExtensions to get Data extensions
[2011-08-31 14:51:54.150] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread: 27 |Category: Deployment.Sdk |User: 00000000-0000-0000-0000-000000000000 |Level: Info | DeploymentRequestChecker.Validate
>SrsExtensionsValidator, result: Level=Success, Description=
[2011-08-31 14:51:54.150] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread: 27 |Category: Exception |User: 00000000-0000-0000-0000-000000000000 |Level: Error | CrmException..ctor
at CrmException..ctor(Int32 errorCode, Object[] arguments)
at DeploymentRequestChecker.Validate()
at DeploymentService.Execute(DeploymentServiceRequest request)
at
at SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
at DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
at ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
at ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc)
at MessageRpc.Process(Boolean isOperationContextSet)
at ChannelHandler.DispatchAndReleasePump(RequestContext request, Boolean cleanThread, OperationContext currentOperationContext)
at ChannelHandler.HandleRequest(RequestContext request, OperationContext currentOperationContext)
at ChannelHandler.AsyncMessagePump(IAsyncResult result)
at AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at AsyncResult.Complete(Boolean completedSynchronously)
at ReceiveItemAndVerifySecurityAsyncResult`2.InnerTryReceiveCompletedCallback(IAsyncResult result)
at AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at AsyncResult.Complete(Boolean completedSynchronously)
at AsyncQueueReader.Set(Item item)
at InputQueue`1.Dispatch()
at ScheduledOverlapped.IOCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
at IOCompletionThunk.UnhandledExceptionFrame(UInt32 error, UInt32 bytesRead, NativeOverlapped* nativeOverlapped)
at _IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)
>Crm Exception: Message: The Deployment Service cannot process the request because one or more validation checks failed., ErrorCode: -2147167645
[2011-08-31 14:51:54.150] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread: 27 |Category: Deployment.Sdk |User: 00000000-0000-0000-0000-000000000000 |Level: Error | DeploymentExecutionContext.Dispose
>Exception on the server in CrmDeploymentService.Execute during the execution of BeginCreateOrganizationRequest: Microsoft.Crm.CrmException: The Deployment Service cannot process the request because one or more validation checks failed.
at Microsoft.Xrm.Sdk.Deployment.DeploymentRequestChecker.Validate()
at Microsoft.Xrm.Sdk.Deployment.DeploymentService.Execute(DeploymentServiceRequest request)
[2011-08-31 14:51:54.166] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread: 27 |Category: Platform.Sdk |User: 00000000-0000-0000-0000-000000000000 |Level: Error | ServiceModelTraceRedirector.TraceData
><TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Error"><TraceIdentifier>http://msdn.microsoft.com/en-US/library/System.ServiceModel.Diagnostics.TraceHandledException.aspx</TraceIdentifier><Description>Handling an exception.</Description><AppDomain>/LM/W3SVC/2/ROOT/XRMDeployment-1-129592521292079795</AppDomain><Exception><ExceptionType>System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.Deployment.DeploymentServiceFault, Microsoft.Crm.DeploymentService, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]], System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType><Message>The Deployment Service cannot process the request because one or more validation checks failed.</Message><StackTrace> at Microsoft.Xrm.Sdk.Deployment.DeploymentService.Execute(DeploymentServiceRequest request)
> at SyncInvokeExecute(Object , Object[] , Object[] )
> at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]&amp; outputs)
> at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc&amp; rpc)
> at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc&amp; rpc)
> at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc&amp; rpc)
> at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)</StackTrace><ExceptionString>System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.Deployment.DeploymentServiceFault]: The Deployment Service cannot process the request because one or more validation checks failed. (Fault Detail is equal to Microsoft.Xrm.Sdk.Deployment.DeploymentServiceFault).</ExceptionString></Exception></TraceRecord>the Deployment server app pool is running with a service account "crmdeploysvc" having necessary permissions on sql server residing on another machine.
on sql server I got the following event log errors :
Report Server (CRM2011) cannot load SQLPWD Extension
and the following screen shot of the error number 2...
In the code that I'm using to create an organization , I've passwed the CRM administrator's credentials. The code looks like the following :
Guid operationId = Guid.Empty;
try
{
DeploymentServiceClient client = new DeploymentServiceClient("CustomBinding_IDeploymentService");
//using (DeploymentServiceClient client = new DeploymentServiceClient("CustomBinding_IDeploymentService"))
//{
CRMDeplymentService.Organization org = new CRMDeplymentService.Organization();
org.BaseCurrencyCode = "USD";
org.BaseCurrencyName = "US Dollar";
org.BaseCurrencyPrecision = 2;
org.BaseCurrencySymbol = "$";
org.BaseLanguageCode = 1033;
org.FriendlyName = "IBM";
org.UniqueName = "IBM";
org.FriendlyName = "IBM";
org.DatabaseName ="IBM_MSCRM";
org.SqlCollation = "Latin1_General_CI_AI";
org.SqlServerName = "CRM2011SQL\\CRM2011";
org.State = OrganizationState.Enabled;
org.SrsUrl = "http://crm2011sql/ReportServer_CRM2011";
org.SqmIsEnabled = false;
// IgnoreCertificateError();
ClientCredentials Credentials = new ClientCredentials();
Credentials.Windows.ClientCredential = new NetworkCredential(CRMAdminUser, CRMAdminUserPassword, CRMServerDomain);
ApplyCredentials(client, Credentials);
CRMDeplymentService.BeginCreateOrganizationRequest request = new BeginCreateOrganizationRequest();
request.Organization = org;
CRMDeplymentService.BeginCreateOrganizationResponse response = (BeginCreateOrganizationResponse)client.Execute(request);
// The operation is asynchronous, so the response object contains a unique identifier
// for the operation
operationId = response.OperationId;
//client.Close();
// }
}
catch
{
}
If I set the Application Pool Identity to CRM\Administrator on the deployment server the organization is created but its state is "Pending" and also in the MSCRM_Config database , in the table Organization , the "AreReportsPublished" column for the created organization is false.
Please help me resolving this issue.
Wednesday, August 31, 2011 10:13 AM
Answers
-
Now this was tough to find.
My problem turned out to be that Deployment Web Service Account didn't have write permissions to the Active Directory OU containing the CRM groups and specifically the "ReportingGroup".
Just go to Active Directory Users and Computers, right click on the OU, select Delegate Control and grant the user access to the OU.
As for the organization being "Pending". It takes some time. Simply wait and it will be enabled.
- Proposed as answer by Sherif Elmetainy Tuesday, September 13, 2011 5:32 PM
- Marked as answer by Jamie MileyModerator Monday, February 20, 2012 4:00 PM
- Unmarked as answer by Jamie MileyModerator Monday, February 20, 2012 4:00 PM
- Marked as answer by Jamie MileyModerator Tuesday, March 5, 2013 12:59 PM
Tuesday, September 13, 2011 5:32 PM
All replies
-
The example given in the SDK is as follows:
Organization organization = new Organization(); organization.Id = SequentialGuid.CreateGuid(); organization.FriendlyName = “My Organization Name”; organization.SqlServerName = Config.SetupSqlServer; organization.SrsUrl = "http://" + Config.SetupSqlServer + "/reportserver"; organization.BaseLanguageCode = baseLanguageCode; BeginCreateOrganizationRequest request = new BeginCreateOrganizationRequest(); request.Organization = organization; Guid operationId = ((BeginCreateOrganizationResponse)_deploymentService.Execute(request)).OperationId;
Check out my about.me profile!
http://mileyja.blogspot.com
Linked-In Profile
Follow Me on Twitter!- Edited by Jamie MileyModerator Wednesday, August 31, 2011 2:19 PM
Wednesday, August 31, 2011 12:43 PMModerator -
Yes it is mentioned in the document titled "Microsoft Dynamics CRM 2011 Service Provider Planning and Deployment Guide"
it is available here http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=14259
The code that I'm using(mentioned above in my previous post) is able to create an organization if I change the Deployment server App Pool identity to CRM Administrator, but its state is "Pending".
Wednesday, August 31, 2011 1:20 PM -
Is the user you are using in to make the call set up as a deployment administrator in CRM?
Jamie Miley
Check out my about.me profile!
http://mileyja.blogspot.com
Linked-In Profile
Follow Me on Twitter!Wednesday, August 31, 2011 2:20 PMModerator -
Yes Jamie. It is set up as a Deployment administrator. If I change the CrmDeploymentServiceAppPool's Identity to use this caller user crm\Administrator( Domain Admin cum CRM Admin), organizations are created but their state is showing as "Pending". If I create an org using the deployment manager , everything is ok. Also in the MSCRM_Config database , in the table Organization , the "AreReportsPublished" column for the created organization is false. It seems something is going wrong with the reporting server and permissions to execute stuff on it.
Any Ideas what's going wrong here?
Thursday, September 1, 2011 4:54 AM -
Please any one help me here.Thursday, September 1, 2011 11:49 AM
-
Try to turn on tracing on the server, and then recreate the problem and examine the logs. Maybe it will shed some light.
http://support.microsoft.com/kb/907490
Jamie Miley
Check out my about.me profile!
http://mileyja.blogspot.com
Linked-In Profile
Follow Me on Twitter!Thursday, September 1, 2011 12:52 PMModerator -
Tracing is enabled already. Please check my first post the exception segment is taken from the deployment server trace.
I checked the sql server event log there i saw the following error :
Report Server (CRM2011) cannot load SQLPWD Extension
Also for all organization in "pending" state , nothing got entered in the ReportBase table of the org_MSCRM database.
Friday, September 2, 2011 9:50 AM -
That's interesting. Is your server only set up to use Integrated AD Auth and not allow SQL authentication. Otherwise in SQL Configuration manager you should try to turn the server to mixed mode to see if that helps.
Jamie Miley
Check out my about.me profile!
http://mileyja.blogspot.com
Linked-In Profile
Follow Me on Twitter!Friday, September 2, 2011 2:01 PMModerator -
Mixed mode Authentication is selected already. The org db is created , all tables except the Report related tables, are being populated . I'm clueless here.Tuesday, September 6, 2011 8:03 AM
-
Please help me hereTuesday, September 6, 2011 10:00 AM
-
Also it is observed that for the organizations created with the deployment web service , the table name "AsyncOperationBase" in org_MSCRM database is empty.Tuesday, September 6, 2011 12:14 PM
-
Also Org creation through powershell is not working either.. same thing org created with state as "Pending" ... Organizations created from deployment manager are being created just fine with the state being "Enabled"Tuesday, September 6, 2011 4:29 PM
-
Interesting, can you post your powershell code for this?
Jamie Miley
Check out my about.me profile!
http://mileyja.blogspot.com
Linked-In Profile
Follow Me on Twitter!Tuesday, September 6, 2011 4:40 PMModerator -
Sure, I've created a c# console app to create orgs using the following powershell command :
New-CrmOrganization -DisplayName "Org_name" -SQLServerName "crm2011sql\crm2011" -SrsUrl "http://crm2011sql/ReportServer_crm2011" -Name "crm2011sql" -BaseCurrencyCode "USD" -BaseCurrencyName "US Dollar" -BaseCurrencySymbol "$" -BaseCurrencyPrecision "2" -BaseLanguageCode 1033 -SqlCollation "Latin1_General_CI_AI" -SQMOptIn false
Both from console app and directly from powershell I'm getting the same result
Tuesday, September 6, 2011 5:01 PM -
Have you managed to solve this issue? I am having the exact same problem.Monday, September 12, 2011 5:50 PM
-
Now this was tough to find.
My problem turned out to be that Deployment Web Service Account didn't have write permissions to the Active Directory OU containing the CRM groups and specifically the "ReportingGroup".
Just go to Active Directory Users and Computers, right click on the OU, select Delegate Control and grant the user access to the OU.
As for the organization being "Pending". It takes some time. Simply wait and it will be enabled.
- Proposed as answer by Sherif Elmetainy Tuesday, September 13, 2011 5:32 PM
- Marked as answer by Jamie MileyModerator Monday, February 20, 2012 4:00 PM
- Unmarked as answer by Jamie MileyModerator Monday, February 20, 2012 4:00 PM
- Marked as answer by Jamie MileyModerator Tuesday, March 5, 2013 12:59 PM
Tuesday, September 13, 2011 5:32 PM -
Did you find the resolution to this issue?
Jamie Miley
Check out my about.me profile!
http://mileyja.blogspot.com
Linked-In Profile
Follow Me on Twitter!Monday, February 20, 2012 4:01 PMModerator -
The IG says:
To perform organization operations through the Deployment Web Service or Windows PowerShell, the Deployment Service account must have system administrator permissions on the computer that is running SQL Server and must be a member of the local administrators group where SQL Server is installed.
Additionally, the user that is performing the organization operations should be a Deployment Administrator.
Thursday, March 29, 2012 12:18 PM -
Now this was tough to find.
My problem turned out to be that Deployment Web Service Account didn't have write permissions to the Active Directory OU containing the CRM groups and specifically the "ReportingGroup".
Just go to Active Directory Users and Computers, right click on the OU, select Delegate Control and grant the user access to the OU.
As for the organization being "Pending". It takes some time. Simply wait and it will be enabled.
Indeed!
I was trying to do a simple thing - create, disable, remove crm organization using powershell. Everything else worked including managing organizations from Deployment Manager.
I ended up with "New-CrmOrganization : The Deployment Service cannot process the request because one or more validation checks failed."
After enabling error traps as per http://msdn.microsoft.com/en-us/library/gg328563.aspx I was able to come closer to the core of the problem by getting the error explanation:Error| Details:
ActiveDirectoryRightsCheck: The current user does not have required permissions (read/write) for the following Active Directory group: CN=ReportingGroup {9b6516a7-87a2-4c8b-9d29-18f250801cce},OU=CRM2011,OU=Services,DC=DOMAIN,DC=COMI couldn't figure out from this message who is "the current user". I was confused because I was running the powershell console as domain admin, and adding DWS account to domain admins(I know) did not change a thing.
The simple hint regards delegating control to Deployment Web Service account gave the desired effect.
Was already running out of ideas.
Thanks!
PS
And while I write this, the state "Pending" changed to "Enabled" for my new CRM organization created from powershell;)
Friday, May 31, 2013 8:39 AM