function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Alexandr ZhuryloAlexandr Zhurylo 

Recieve error FIELD_INTEGRITY_EXCEPTION whenever trying to insert User

I'm trying to crete new User, and recieve this error 
Line: 15, Column: 1
System.DmlException: Insert failed. First exception on row 0; first error: FIELD_INTEGRITY_EXCEPTION, Salesforce CRM Content User is not allowed for this License Type.: [UserPermissions]
Does anyone have any ideas how to fix it?
Raj VakatiRaj Vakati
Looks like you are trying to "Salesforce CRM Content " Permission or persmiiosn set to the user licenses which is not supported


Check which User profile you are trying to assign this permission and see 

https://help.salesforce.com/articleView?id=content_initialsetup.htm&type=5 
Alexandr ZhuryloAlexandr Zhurylo
@Raj Vakati  I'm trying assign ProfileId = ''System Admin' with User License Salesforce