My guess is this is how Spring Security works. It will populate this parameter if you login with a browser, but not if you send an access token. You could use the access token to call the /userinfo endpoint and get the user’s information that way. Or you could use Jwt instead of OidcUser, like this example shows.
What could we do to make Spring provide the OidcUser (or any Principal for that matter) directly in controller methods when using only an access_token for auth?
I could be wrong, but I don’t think there would be a way to do this without some fundamental changes to Spring Security. I suppose it depends on your goal, but maybe switching out OidcUser for Jwt would work, since providing the JWT in an Authorization header will allow you to get necessary claims and the user id / sub claim.