Setting the user title(group?) based on the information that is coming from the sso payload

Since I just went down this same road, to help a future new person who may be puzzled for a moment…

Inside the User → Group settings, within a chosen group, under Membership, there is a checkbox for ‘Automatically set as primary group’. Presumably only one group can have this attribute set, but I have not tested that detail…