When attempting to execute a z/OS Management Facility (z/OSMF) API call via the Zowe API Mediation Layer (ML) Swagger interface, the request fails with a 401 Unauthorized error.
x-zowe-auth-failure: Unable to obtain a token from z/OSMF service.ICH408I violation messages indicating an invalid password or authentication failure when Zowe attempts to generate a PassTicket for the target user.This issue typically occurs when Zowe is configured to use SAF as the authentication provider but the environment is not correctly set up to generate PassTickets for z/OSMF. In this mode, Zowe must use a PassTicket to authenticate to the z/OSMF instance on behalf of the user.
Common causes include:
ZOSMF APPLID (default is IZUDFLT) PassTicket profile is not defined in the PTKTDATA class.zowe.yaml configuration points to an incorrect z/OSMF application ID (applid).Ensure that the ZOSMF APPLID profile is defined in the PTKTDATA class to allow PassTicket generation for z/OSMF.
Permit the Zowe started task ID (e.g., ZWESVUSR) UPDATE access to the PassTicket profile used by z/OSMF.
Verify that the zowe.yaml file correctly identifies the z/OSMF host, port, and application ID. The applId should typically match the profile name defined in Step 1.
zOSMF: host: [your.zosmf.host] port: [your_port] applId: IZUDFLT
If you are using a static service definition for z/OSMF, verify that the authentication scheme is set to httpBasicPassTicket.
authentication: scheme: httpBasicPassTicket applid: IZUDFLT
Use the security command in the ISPF syslog to display the z/OSMF server settings. For example, if the z/OSMF started task name is IZUSVR1, issue the following command:
F IZUSVR1,DISPLAY IZU
In the resulting output, locate the SAF_PROFILE line. For instance, a value of SAF_PREFIX(IZUDFTL) indicates that the z/OSMF APPLID is IZUDFTL.
Related document: Configuring Zowe to use PassTickets