---
title: "create_access_policy"
description: "Create an access policy with an easy step-by-step wizard and retrieve the policy ID through a callback. (Gitana 4.0)"
product: "Gitana"
version: "4.0"
url: "/documentation/gitana/4.0/developers/ui-dev/actions/create_access_policy"
---

# create\_access\_policy

ID: `create_access_policy`

Brings up a multi-step wizard that guides a user through the process of creating an Access Policy. The resulting access policy is handed back in the callback.

## Sample Code

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

var actionContext = {};
UI.startAction(observableHolder, "create_access_policy", actionContext, function(err, accessPolicyId) {

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

    // the created access policy ID is handed back

});
```

## Configuration

The sample code passes an empty `actionContext`. The created access policy ID is handed back as the second argument of the callback.
