The title of this task is deliberately similar to T334083, because it might be the same or a similar issue.
I am currently testing MediaWiki 1.39.5 with extensions PluggableAuth 7.0.0 and SimpleSAMLphp 7.0.0 (with SimpleSAMLphp 1.19.7 as Service Provider). I have seen this behaviour also in 1.39.4 and 1.39.3 with the 7er versions of these extensions.
When logging into a wiki with a user that is currently unknown to the wiki (i.e. successfully returning from the login page of the Shibboleth IdP), the user is created in the mediawiki database, but it is not associated with any user groups. Only after a second login via the IdP (after logging out or using a new browser window), the requested groups are associated and the wiki is usable as desired.
I have used PluggableAuth-REL1_39-cfd7f79.tar.gz generated this morning and SimpleSAMLphp-REL1_39-c57ad6a.tar.gz created in August. It is unclear to me, if the changes mentioned in T334083 are present in these releases.
NB that users already present in the database are unaffected when e.g. upgrading from previous versions. I am currently using MW 1.39.2 and PluggableAuth 6.2 and SSP 5.0.1 in production, and the problem is not immediately obvious after upgrading to newer versions.