Frontline workforce management requires precise control over schedule visibility, shift swaps, open shift requests, and automated attendance tracking. In Microsoft Teams, the Shifts application centralises scheduling for healthcare, retail, manufacturing, and field service teams. To enforce labour compliance, prevent premature clock-ins, and ensure accurate physical attendance, enterprise administrators govern Shifts capabilities through policy packages and dedicated PowerShell cmdlets. Using CsTeamsShiftsPolicy, administrators can control whether workers can clock in off-site, define GPS coordinates for location geofencing, and govern self-service shift exchange workflows.
Understanding CsTeamsShiftsPolicy Management
The CsTeamsShiftsPolicy cmdlet suite in the Microsoft Teams PowerShell module manages frontline worker permissions across mobile, web, and desktop Teams clients. A Shifts policy controls several critical operational boundaries:
- Shift Management Capabilities: Determines whether frontline employees can view team schedules, request open shifts, initiate shift swaps with co-workers, or offer shifts for managerial re-assignment.
- Time Clock Enablement: Activates or suppresses the built-in mobile Time Clock module, including break recording and shift departure stamps.
- Geofencing and Location Enforcement: Restricts employee clock-ins and clock-outs to verified physical job sites by checking the mobile device GPS coordinates against defined workplace boundaries.
- Granular Persona Scoping: Allows organisations to assign different Shifts operational tiers to full-time staff, part-time associates, and temporary contractors across branches.
Connecting to Microsoft Teams PowerShell
To manage Shifts policies, launch PowerShell as an administrator and connect to the Microsoft Teams tenant using an account with the Teams Administrator or Global Administrator role:
# Import and connect to Microsoft Teams
Import-Module MicrosoftTeams
Connect-MicrosoftTeams
Auditing Existing Shifts Policies
Review the existing Shifts policies currently configured within your Microsoft 365 tenant:
Get-CsTeamsShiftsPolicy | Select-Object Identity, Description, EnableShifts, EnableTimeClock, EnableGeofence
To inspect the detailed parameters of the tenant-wide Global policy:
Get-CsTeamsShiftsPolicy -Identity "Global" | Format-List
Creating a Custom Frontline Shifts Policy with Geofencing
Create a dedicated Shifts policy tailored for branch store associates that enables the Time Clock module while enforcing location-aware clock-in boundaries:
New-CsTeamsShiftsPolicy -Identity "Retail-Frontline-ShiftsPolicy" `
-Description "Shifts policy for retail associates requiring on-site geofenced clock-in" `
-EnableShifts $true `
-EnableTimeClock $true `
-EnableGeofence $true `
-EnableOpenShifts $true `
-EnableSwapShifts $true `
-EnableOfferShifts $true
Parameter definitions:
-EnableShifts: Toggles core Shifts app functionality for assigned users.-EnableTimeClock: Permits employees to record shift start, meal breaks, and departure times directly inside Microsoft Teams on iOS and Android.-EnableGeofence: Enforces location verification. When set to$true, the mobile client cross-references device GPS coordinates with the physical location coordinates assigned to the team schedule. Clock-ins attempted outside the geofence boundary are flagged or blocked.-EnableSwapShifts: Allows workers to initiate peer-to-peer shift swaps, subject to manager approval.
Configuring Restrictive Policies for Seasonal Contractors
For temporary or contracted staff, organisations often require clock-in privileges without allowing open shift requests or peer swaps. Create a restrictive contractor policy:
New-CsTeamsShiftsPolicy -Identity "Contractor-ShiftsPolicy" `
-Description "Restricted Shifts policy for temporary seasonal workers" `
-EnableShifts $true `
-EnableTimeClock $true `
-EnableGeofence $true `
-EnableOpenShifts $false `
-EnableSwapShifts $false `
-EnableOfferShifts $false
Modifying Existing Shifts Policies
Update existing policies using Set-CsTeamsShiftsPolicy. For instance, to temporarily disable shift swaps across a specific policy during holiday operational freezes:
Set-CsTeamsShiftsPolicy -Identity "Retail-Frontline-ShiftsPolicy" -EnableSwapShifts $false
Assigning Shifts Policies to Frontline Workers
Assign policies directly to individual user accounts or batch-assign them across departmental security groups using Entra ID attributes:
# Direct assignment to a single employee
Grant-CsTeamsShiftsPolicy -Identity "[email protected]" -PolicyName "Retail-Frontline-ShiftsPolicy"
# Bulk assignment across a branch security group
Get-AzADGroupMember -GroupDisplayName "Store 402 Personnel" | ForEach-Object {
Grant-CsTeamsShiftsPolicy -Identity $_.UserPrincipalName -PolicyName "Retail-Frontline-ShiftsPolicy"
}
To verify the effective policy applied to an employee:
Get-CsUserPolicyAssignment -Identity "[email protected]" | Where-Object { $_.PolicyType -eq "TeamsShiftsPolicy" }
Validating Time Clock Geofencing on Mobile Devices
Once assigned, instruct a test employee to launch Microsoft Teams on iOS or Android and navigate to More > Shifts > Time Clock. If the employee is physically located away from the designated store coordinates, Teams displays an alert confirming that the user is outside the workplace perimeter, preventing off-site attendance recording and safeguarding payroll integrity.