# CPF2204: User profile not found

Source: https://wndsoftware.com/mainframe-errors/cpf2204

### CPF2204: User profile not found

CPF2204 means a command or API was given a user profile name that doesn't exist on this system. The text reads "User profile <name> not found."


#### Other names for this code

Also written as `MSGCPF2204`, `CPF2204 user profile not found`, `user profile not found AS400`, `iSeries CPF2204`, `IBM i user profile not found`.


### What it means

Many IBM i commands and APIs take a user profile name as input. Commands such as DSPUSRPRF and CHGUSRPRF are the obvious ones. The Get Profile Handle API (QSYGETPH), which programs and servers use to check a user ID and password or to switch to another profile, also lists CPF2204 among its errors. When the name given doesn't match any profile on the system, the request ends with CPF2204, usually as an escape message.

The message is plain. The profile isn't there. The work is in finding out why the name was wrong or why the profile is missing. In a CL program it's often a hard-coded name that exists on one system and not another.

On IBM i 7.5 the security APIs changed. When both a user ID and a password are supplied, they now return CPF22E2 for an unknown user ID too, instead of CPF2204, so a caller can't use the difference to find valid user IDs. Commands that only take a profile name still send CPF2204.


### Common causes

- The profile name was mistyped.
- A CL program, job scheduler entry or script names a profile that exists on another system or partition but not this one.
- The profile was deleted, for example when someone left, but programs and schedules still refer to it.
- The name was passed in lowercase, in quotes such as `'jsmith'` or in a CL variable. Neither is converted to upper case, and profile names are stored in upper case.
- Profiles weren't restored yet on a new or recovery system.


### How to find the problem

- Open the job log with `DSPJOBLOG` and find CPF2204. The message before it, or the command it follows, tells you which program and statement named the profile.
- List the profiles that exist with `WRKUSRPRF USRPRF(*ALL)`, or run `SELECT AUTHORIZATION_NAME FROM QSYS2.USER_INFO` in SQL.
- Check the source of the failing CL program or the job scheduler entry for the hard-coded name.
- If the profile used to exist, check whether it was deleted on purpose before you recreate it.


### How to fix it

- Correct the profile name in the command, program or schedule.
- If the profile should exist, create it with `CRTUSRPRF`, or restore it with `RSTUSRPRF` and then run `RSTAUT` to restore its private authorities.
- In CL, don't quote profile names in lowercase, and convert names read from files or other systems to upper case before you use them.
- In programs that may run where the profile is missing, monitor for it with `MONMSG MSGID(CPF2204) EXEC(...)`.


### IBM documentation

[IBM Display Message Descriptions (DSPMSGD)](https://www.ibm.com/docs/en/i/7.5.0?topic=ssw_ibm_i_75/cl/dspmsgd.htm). Use the documentation for your installed release.

This link opens the relevant IBM reference library or lookup instructions. Match the complete code and your installed product release; it is not a code-specific review.

Read the installed message description:


```text
DSPMSGD MSGID(CPF2204) MSGF(QSYS/QCPFMSG)
```

Also inspect the full job log and second-level message text, including substitution values.

[Report a correction to WND Software](https://wndsoftware.com/contact#message).

Technical reviewer: [Albert Joseph](https://wndsoftware.com/authors/albert-joseph), WND Software.

Last reviewed 2026-10-18 by the WND Software team. Written in our own words. For the full reference, check IBM’s documentation for your IBM i release.


### Related codes

[CPF1120 User does not exist Read →](https://wndsoftware.com/mainframe-errors/cpf1120)
[CPF22E2 Password not correct for user profile Read →](https://wndsoftware.com/mainframe-errors/cpf22e2)
[CPF9801 Object not found Read →](https://wndsoftware.com/mainframe-errors/cpf9801)
[CPF2207 Not authorized to use object Read →](https://wndsoftware.com/mainframe-errors/cpf2207)
[CPF1118 No password associated with user Read →](https://wndsoftware.com/mainframe-errors/cpf1118)

### Questions


#### What is the difference between CPF2204 and CPF1120?

CPF1120 is the sign-on display's message for a user ID it couldn't accept. CPF2204 comes from commands and APIs that were handed a profile name that doesn't exist.


#### Why does my program get CPF22E2 instead of CPF2204 for a missing user?

On IBM i 7.5 the security APIs return CPF22E2 for both a wrong password and an unknown user ID when both are supplied. This hides which user IDs are valid.


#### Can I check whether a profile exists without an error?

Yes. CHKOBJ OBJ(QSYS/name) OBJTYPE(*USRPRF) with MONMSG CPF9801 tells a CL program whether the profile exists.

[IBM i CPF, MCH and RPG messages](https://wndsoftware.com/mainframe-errors/ibm-i-messages) · [CPF2189](https://wndsoftware.com/mainframe-errors/cpf2189) · [CPF2207](https://wndsoftware.com/mainframe-errors/cpf2207)

[← All error codes](https://wndsoftware.com/mainframe-errors/)
