Unable to access api using a token unless already logged in via UI

Hi

I’ve just updated to Jenkins v2.492.1 and OpenID Connect Auth v4.457.v8d7c72676cfe.

The problem that I’m experiencing is attempting to retrieve job details via the API. If I’m logged into the Jenkins UI, then fine, I can retrieve details of jobs via the API, but if I logout and attempt the same I see this:

`> GET /job/location/job/job-folder/job/job_name/api/json?depth=0 HTTP/2

Host: jenkins-host.somewhere.com
authorization: Basic someencryptedstring
user-agent: curl/7.68.0
accept: /

  • Connection state changed (MAX_CONCURRENT_STREAMS == 128)!
    < HTTP/2 302
    < date: Wed, 19 Feb 2025 16:42:04 GMT
    < content-length: 0
    < server: Jetty(12.0.16)
    < vary: Accept-Encoding
    < x-content-type-options: nosniff
    < location: /job/location/job/job-folder/job/some_job_name/api/securityRealm/commenceLogin`

This was working as expected before the upgrade and now my job monitoring is broken.

Thanks for any help in advance

Found the issue in the cold light of the morning.

Manage Jenkins → Security → Expand Security Configuration → Allow access using a Jenkins API token without an OIDC Session