Symptom
- While updating project header via the standard api to close multiple projects, the error message "no valid employment or user is not authorized" is returned.
- The issue occurs when changing project stage from in-execution to closed for multiple projects.
- The system does not allow the projects to be closed in bulk.
- Related error observed in similar scenarios: "no valid employment or user is not authorized".
Environment
SAP S/4HANA Cloud Public Edition
Reproducing the Issue
- Use a REST client (for example, Postman).
- Call the standard api to update the project header, setting the project stage from in-execution to closed for multiple projects.
- Observe that the request fails with "not a valid employee" (or "no valid employment or user is not authorized").
Cause
- The user's work agreement period is not valid for the project duration; the user's employment must overlap the respective project periods.
- Projects reference inactive responsible employees (for example, an engagement partner). The standard API enforces the same business validations as the Fiori apps, so projects with inactive assignments cannot be processed in bulk.
Resolution
- In the Manage Workforce app, correct the work agreement of the user performing the update so the employment is active and valid for the entire relevant project duration.
- For affected projects, replace any inactive responsible employee (for example, the engagement partner) with an active employee. This can be done manually or via an API-Based mass update.
- Re-run the bulk project closure using the standard API.
- Note: A standard mass-close function that ignores inactive participants is not available. If this is a critical requirement, consider submitting an improvement request via the Customer Influence portal.
See Also
- SAP KBA 3613862 - Projects not updating due to "no valid employment or user is not authorized" error in SAP S/4HANA Cloud Public Edition
Keywords
api, project header, mass close, bulk close, in-execution to closed, not a valid employ, no valid employment, user is not authorized, inactive employee, engagement partner, manage workforce, professional services projects, bulk update, project closure, validation error , KBA , CA-CPD-SS , S/4HANA Public Cloud – Professional Service Projects , How To
Product
SAP S/4HANA Cloud Public Edition all versions
SAP Knowledge Base Article - Public