Monday, February 13, 2017

Error : Too many entities enabled for auto created access teams.



Error Log: 

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Too many entities enabled for auto created access teams.Detail:
<OrganizationServiceFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts">
  <ErrorCode>-2147187918</ErrorCode>
  <ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
  <Message>Too many entities enabled for auto created access teams.</Message>
  <Timestamp>2017-02-13T21:33:05.6114604Z</Timestamp>
  <InnerFault i:nil="true" />
  <TraceText i:nil="true" />
</OrganizationServiceFault>


Solution: 
In MS CRM by default you can enable for auto create access teams to Maximum 5 entities. Once this limit reaches you will see above error message.
This limit is specified in MaxEntitiesEnabledForAutoCreatedAccessTeams deployment setting.
You need to update this deployment setting if you have more than 5 entities.

To update you can use Powershell

Add-PSSnapin Microsoft.Crm.PowerShell
$Cred = Get-Credential
$CrmOrgs=Get-CrmOrganizations -serverUrl https://< CRM_Server_Host >
 -Credential $Cred
Get-CrmSetting -SettingType TeamSettings
$set =Get-CrmSetting -SettingType TeamSettings
$set.MaxEntitiesEnabledForAutoCreatedAccessTeams = “6”
Set-CrmSetting -Setting $set
 
Useful links for PowerShell:
https://technet.microsoft.com/en-us/library/dn905215.aspx#BKMK_changemon
https://technet.microsoft.com/en-us/library/dn531194.aspx
https://msdn.microsoft.com/en-us/library/microsoft.xrm.sdk.deployment.teamsettings.maxentitiesenabledforautocreatedaccessteams(v=crm.7).aspx 

To Update using SQL
Login to SQL server
Run following query on MSCRM_CONFIG database
select * from DeploymentProperties where ColumnName ='MaxEntitiesEnabledForAutoCreatedAccessTeams'

To Update MaxEntitiesEnabledForAutoCreatedAccessTeams  setting run
update DeploymentProperties set IntColumn = 6 where ColumnName ='MaxEntitiesEnabledForAutoCreatedAccessTeams'

Verify your setting is changed or not using select query.
Now you can able to enable 6th entity for auto create access team. 

No comments:

Post a Comment