Description
The selected Primary Table(s) parameter must reference data that contains geometry.
Solution
Choose a dataset that contains geometry.
If the dataset is a feature service, use the URL to the FeatureServer (for example, https://gisserver.domain.com:6443/arcgis/rest/services/<service_name>/FeatureServer/<layer_id_number>), not the MapServer (for example, https://gisserver.domain.com:6443/arcgis/rest/services/<service_name>/MapServer/<layer_id_number>).