Overview

This is an automation code sample used by an Automation Engineer.

In this template, we show you how you can select a User and Pia Agent (machine) to perform the required actions. You can use this template in your custom automations as it takes care of the user and agent selection process for all environments (i.e., Cloud Hybrid, Cloud Only, On-Prem, and Semi-Hybrid).

Download this sample into your sandbox and customize it to fit your specific automation needs.

More PiaPacks

User Management Sample (Blueprint)

Activity Collection for Active Directory

By Pia 30 Dec 2025
Provides a sample of Active Directory automations which are used within our pre-built automations, allowing you to customise and build your own packages without starting from scratch.
User Management Extension Automation

Add User to Groups for Offboarding

By Pia 29 Oct 2025
Automatically adds users to configured Microsoft 365 groups during automation workflows, eliminating manual steps. Enhances efficiency, prevents missed configurations, and supports seamle...
User Management Smartform
trending-heart

SmartForms: Add/Remove Access to Groups

By Pia 10 Apr 2026
This SmartForm enables self service group access management, reducing service desk tickets, accelerating changes, improving client control, and allowing engineers to focus on complex valu...