---
title: "unassign_access_policy"
description: "Unassign access policies easily with a modal prompt and confirm process, complete with sample code and configuration guide. (Gitana 4.0)"
product: "Gitana"
version: "4.0"
url: "/documentation/gitana/4.0/developers/ui-dev/actions/unassign_access_policy"
---

# unassign\_access\_policy

ID: `unassign_access_policy`

This pops up a modal to ask the user if they'd like to unassign the specified Access Policies. Upon confirmation, the Access Policies are unassigned from the target (specified by `ref`).

## Sample Code

```
var UI = require("ui");

var actionContext = {};
actionContext.data = [policyId1];
actionContext.ref = node.ref(); // "node://platformId/repositoryId/branchId/nodeId";
UI.startAction(observableHolder, "unassign_access_policy", actionContext, function(err) {

    // if something went wrong, err will contain the error
    // otherwise, success

});
```

## Configuration

The sample code sets the following `actionContext` keys:

| Key | Type | Description |
| --- | --- | --- |
| `data` | array | The Access Policies to unassign (`[policyId1]` in the sample) |
| `ref` | string | The target to unassign the Access Policies from, set from `node.ref()` in the sample (for example, `"node://platformId/repositoryId/branchId/nodeId"`) |
