Help Center/ CodeArts Agent/ FAQs/ Account and Permission Management/ How Do I Handle the Error 403 "Insufficient permissions. Contact your account administrator to assign you a policy with the codearts:monthlyPackage:subscribe action."?
Updated on 2026-07-30 GMT+08:00

How Do I Handle the Error 403 "Insufficient permissions. Contact your account administrator to assign you a policy with the codearts:monthlyPackage:subscribe action."?

Symptom

When you enable CodeArts Agent packages or pay-per-use billing as an IAM user, the error message "Insufficient permissions. Contact your account administrator to assign you a policy with the codearts:monthlyPackage:subscribe action." is displayed in the upper right corner.

Cause Analysis

The current IAM user has not been granted the fine-grained permission to purchase CodeArts Agent.

Solution

  1. Log in to the new Identity and Access Management (IAM) console using your HUAWEI ID.
  2. Create and configure a custom identity policy for enabling CodeArts Agent packages or pay-per-use billing.

    1. In the navigation pane on the left, click Identity Policies. The identity policy page is displayed.
    2. Click Create Identity Policy in the upper right corner.
    3. Set the custom identity policy by referring to Table 1.
      Figure 1 Creating a custom identity policy
      Table 1 Custom identity policy parameters

      Parameter

      Description

      Policy Name

      Enter a policy name. Only letters, digits, and the following special characters are allowed: +=_.@-

      Policy View

      Select Visual editor.

      Policy Content

      Configure the CodeArts permission as follows. Only this permission is required for enabling or disabling pay-per-use billing.

      1. Select Allow.
      2. Cloud service: Enter codearts in the search box and select CodeArts (codearts).
      3. Actions: Enter monthly in the search box and select codearts:monthlyPackage:subscribe and codearts:monthlyPackage:listResourceDetail.
      4. Skip Select resource.
      5. Skip (Optional) Add request condition.

      To enable CodeArts Agent packages, you also need to configure the billing permission as follows:

      1. Click Add Permissions.
      2. Select Allow.
      3. Cloud service: Enter billing in the search box and select billing (billing).
      4. Actions: Enter order in the search box and select billing:order:pay and billing:order:view.
      5. Skip Select resource.
      6. Skip (Optional) Add request condition.

      Description

      Optional. Enter a brief description for the policy.

    4. Click OK.

      The new policy is displayed on the Identity Policies page.

  3. Grant the custom identity policy to the IAM user who needs to enable CodeArts Agent packages or pay-per-use billing.

    1. In the navigation pane, choose Users to go to the Users page.
    2. Locate the target IAM user and click Authorize in the Operation column.
    3. Authorize the IAM user by referring to Table 2.
      Table 2 Authorization parameters

      Parameter

      Description

      Assign By

      Select Identity policy.

      Identity Policy

      Enter the identity policy created in 2 in the search box, press Enter, and select the identity policy.

    4. Click OK. The Information dialog box is displayed.
    5. Click OK. A message is displayed, indicating that the authorization is successful. Click Finish.

      It takes 15 to 30 minutes for the authorization to take effect.

  4. Log in to the CodeArts Agent console as the authorized IAM user and enable CodeArts Agent packages or pay-per-use billing again.