How to create and assign a custom policy
Updated over a week ago

Welcome to this guide on how to use Swif's new feature that allows users to create custom policies and assign them to a device or device group. This step-by-step guide will provide you with all the necessary instructions to make full use of this new feature.

Step 1:

To begin, you need to create a new custom policy. This can be achieved by clicking the 'Create New Policy' button and selecting 'New Custom Policy' from the model.

Image

Image

Step 2:

To configure the custom policy, you will need to input a policy name.

Image

For instance, a simple custom policy can be created with a similar description.

Image

Please note that currently, we only support custom policies for macOS.

Image

Step 3:

You can define the identifier for the custom policy as a reverse domain name notation. An example of how to do this is provided below.

Image

Step 4:

For the payload content, you will need to define the custom policy payload in an XML format.

Image

Here is a sample custom policy payload. For example, this is a sample mobileconfig and you can copy the value of <key>PayloadContent</key> like below to the Payload Content input.

<array>
<dict>
<key>{{Field}}</key>
<true/>
<key>PayloadIdentifier</key>
<string>{{Identifier}}</string>
<key>PayloadType</key>
<string>{{Payload_Type}}</string>
<key>PayloadUUID</key>
<string>{{Payload_UUID}}</string>
<key>PayloadVersion</key>
<integer>1</integer>
</dict>
</array>

Step 5:

Once you have created the custom policy that you wish to assign to the device or device group, click on the 'Continue' button. This will allow you to select the device to which you want to assign the custom policy.

Image

Step 6:

You can also select the device group for the custom policy to be installed on. After doing so, click 'Continue'.

Step 7:

Review the custom policy that is to be installed on the device or device group. Make sure the details are correct before proceeding.

Image

Step 8:

Click on the 'Finish' button to complete the process. Once complete, the new policy will be successfully created and the custom policy will be visible with the payload content as the configuration that you wish to apply to the device.

Image

Step 9:

In the device tab, you can see the device that is supposed to have this custom policy installed.

Image

Step 10:

Go to the device details to ensure the custom policy has been installed.

Image

Step 11:

In the policies tab, you can see that the custom policy has been installed on the device. You can manage the custom policy here, including deleting the custom policy if necessary.

Image

Custom policy execution is asynchronous so the errors will return to Swif when it tries to install on devices. You can understand how to view the custom policy report here.

This concludes our guide on how to create and assign custom policies to devices or device groups using Swif. We hope this guide has been helpful and thank you for using Swif!

Did this answer your question?