Salesforce accounts aggregation

Hello,

I’m getting the following error by aggregating account.

sailpoint.connector.InvalidConfigurationException: [ InvalidConfigurationException ] [ Possible suggestions ] Make sure the query filter and schema attributes in the application configuration are valid. [ Error details ] MALFORMED_QUERY: only aggregate expressions use field aliasing

The following is the search query for Users:

select Id from User where ContactId = null and Profile.UserLicense.Name = 'Salesforce'

Do you have any idea ?

Thank you

Maybe the problem is with null ? did you check with your Salesforce team for the search query ?

Hey Tima,

I noticed you are using custom attributes here these are not present in the default schema when we create a salesforce source.
Please follow these steps mentioned in this doc

Also please ensure all the pre requisites are fulfilled.

Let me know if this works :slight_smile:

I tested the query “select Id from User” and it doesn’t work

I tested with only “select Id from User” and the user has the admin profile with required permissions.

The Search Query should be modified with an AS statement so that the value of Id is not aliased
So, you can try:
SELECT Id FROM User WHERE ContactId = null AND Profile.UserLicense.Name = ‘Salesforce’
or
SELECT Id FROM User AS ‘Sample’ WHERE ContactId = null AND Profile.UserLicense.Name = ‘Salesforce’

Let me know if it works

Hi @vambrale,

I’m getting an error with both queries:

sailpoint.connector.InvalidConfigurationException: [ InvalidConfigurationException ] [ Possible suggestions ] Make sure the query filter and schema attributes in the application configuration are valid. [ Error details ] MALFORMED_QUERY: AND Profile.UserLicense.Name = ‘Salesforce’ ^ ERROR at Row:1:Column:942 line 1:942 no viable alternative at character '‘'

I tried with the following

select Id from User as 'Sample' where ContactId = null and Profile.UserLicense.Name = 'Salesforce'

but I’m still getting the error:

sailpoint.connector.InvalidConfigurationException: [ InvalidConfigurationException ] [ Possible suggestions ] Make sure the query filter and schema attributes in the application configuration are valid. [ Error details ] MALFORMED_QUERY: only aggregate expressions use field aliasing

Thank you