SAP Knowledge Base Article - Public

3804026 - PlanningModel.getModelPrivateVersions API shows 'Missing privileges for Model' for some users

Symptom

  • An error occurs when using the .getModelPrivateVersions() API for non-developer roles.
  • Error message: "Failed to retrieve all private and public edit versions of the model 'Missing privileges for Model [Model_ID]'."
  • The issue occurs during the execution of a scheduled story in the Optimized/Unified Story experience.

Environment

  • Product: SAP Analytics Cloud
  • Unified Story scripting related issues

Reproducing the Issue

  1. Sign in with a non-developer role (or a scheduling/service account).
  2. Open a story that runs an initialization script invoking PlanningModel.getModelPrivateVersions().
  3. Let the initialization script run.
  4. Observe the "Missing privileges" error popup.

Cause

The executing role lacks the required Update privilege on the Planning Model, which is necessary for PlanningModel.getModelPrivateVersions() to retrieve private and public edit versions.
-Planning Model has READ, EXECUTE and MAINTAIN  
-Data Change Log/Application has READ, EXECUTE and MAINTAIN 
Those are not enough. UPDATE in needed for both Planning Model and Data Change for the API to work.

Resolution

Add UPDATE.

  1. Grant the executing role Update on the Planning Model (in addition to Read and, where applicable, Execute).
  2. Ensure the role permits running story/Analytics Designer scripting so the script can run in the user's context.
  3. Verify data-level visibility is sufficient (for example, Full Data Access or appropriate Data Access Control settings) so private/public edit versions are not hidden by restrictions.
  4. If applicable to your governance setup, also grant Update on related objects such as Data Change Log/Application.
  5. Re-test the story initialization to confirm that PlanningModel.getModelPrivateVersions() returns versions without the "Missing privileges" error.

See Also

Keywords

getModelPrivateVersions, Missing privileges for Model, private versions, public edit versions, planning model permissions, Update privilege, non-developer role, service account, scheduled story, Unified Story, Optimized Story, SAC scripting, Analytics Designer, data access control, authorization , KBA , LOD-ANA-UNS-SCR , Unified Story Scripting related Issues , Problem

Product

SAP Analytics Cloud 1.0