# PermissionSet Assignment

<table><thead><tr><th width="229">Attribute</th><th>Type</th><th>Description</th><th>Package Types Applicable</th></tr></thead><tbody><tr><td>assignPermSetsPreDeployment</td><td>array</td><td>Apply permsets before installing an artifact to the deployment user</td><td><ul><li>unlocked</li><li>org-dependent unlocked</li><li>source</li><li>diff</li></ul></td></tr><tr><td>assignPermSetsPostDeployment</td><td>array</td><td>Apply permsets after installing an artifact to the deployment user</td><td><ul><li>unlocked</li><li>org-dependent unlocked</li><li>source</li><li>diff</li></ul></td></tr></tbody></table>

Occasionally you might need to assign a permission set for the deployment user to successfully install the package, run apex tests or functional tests, sfp provides you an easy mechanism to assign permission set either before installation or after installation of an artifact.\
\
**assignPermSetsPreDeployment** assumes the permission sets are already deployed on the target org and proceed to assign these permission sets to the user

<pre><code> {
      "path": "src/health-cloud",
      "package": "health-cloud",
      "versionName": "health-cloud-1.0",
      "versionNumber": "1.0.0.0",
      "<a data-footnote-ref href="#user-content-fn-1">assignPermSetsPreDeployment</a>": [
        "HealthCloudFoundation",
        "HealthCloudSocialDeterminants",
        "HealthCloudAppointmentManagement",
        "HealthCloudVideoCalls",
        "HealthCloudUtilizationManagement",
        "HealthCloudMemberServices",
        "HealthCloudAdmin",
        "HealthCloudApi",
        "HealthCloudLimited",
        "HealthCloudPermissionSetLicense",
        "HealthCloudStandard",
        "HealthcareAssociatedInfectionDiseaseGroupAccess"
      ]
    },
</code></pre>

[<br>](https://open.gitbook.com/~space/2r1H8wvoufdI0GKojSUo/sfpowerscripts/types-of-packaging/data-packages)**assignPermSetsPostDeployment** can be used to assign permission sets that are introduced by the artifact to the target org for any aspects of testing or any other automation usage

[^1]: use assignPermSetsPreDeployment for assigning permission sets before installing an artifact


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.flxbl.io/flxbl/sfp/building-artifacts/configuring-installation-behaviour-of-a-package/permissionset-assignment.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
