Users may encounter an HTTP 401 Unauthorized error when using access tokens with z/OSMF through the API Mediation Layer. The logs indicate a PassTicket generation failure with the following error:
org.zowe.apiml.passticket.IRRPassTicketGenerationException: Error on generation of PassTicket: Unable to generate PassTicket... safRc=8, racfRc=16, racfRsn=28
The logs reveal that API ML is attempting to generate a PassTicket using the default z/OSMF application ID IZUDFLT, instead of the z/osmf APPLID configured in zowe.yaml.
Generating PassTicket for user: <user> and ZOSMF applid: IZUDFLT
Zowe
To resolve this, explicitly define the ZWE_zosmf_applId variable within the environment section of your zowe.yaml file.
zowe.yaml configuration file.zowe.environments section.<zOSMF_APPLID> with your actual z/OSMF APPLID: