[{"path":"index.php","content":"graphCall($endpoint, $accessToken, 'POST');\n\n if ($result) {\n render_premium_card('Enrollment Success', 'Successfully enrolled devices', null, 'up', '📊', 100);\n } else {\n render_premium_card('Enrollment Failed', 'Failed to enroll devices', null, 'down', '⚠️', 0);\n }\n}\n\n\/\/ Example of enrolling devices\n$appleTeamID = '12345678'; \/\/ Example placeholder value\n$intuneProfileID = 'abc-123'; \/\/ Example placeholder value\nenrollAppleTvDevices($appleTeamID, $intuneProfileID);\n\n?>"},{"path":"scripts\/Automation.ps1","content":"<#\n.SYNOPSIS\nAutomates the enrollment of Apple TV devices into Microsoft Intune.\n.DESCRIPTION\nThis PowerShell script uses Microsoft Graph API to enroll corporate-owned Apple TV devices into Intune leveraging Apple's Automated Device Enrollment.\nThe script supports bulk enrollments by sending a POST request to the Intune API with the necessary identifiers.\n.EXAMPLE\n.\/EnrollAppleTVDevices.ps1 -AppleTeamID \"12345678\" -IntuneProfileID \"abc-123\"\n.NOTES\nAuthor: Souhaiel Morhag\nCompany: MSEndpoint.com\nBlog: https:\/\/msendpoint.com\nAcademy: https:\/\/app.msendpoint.com\/academy\nLinkedIn: https:\/\/linkedin.com\/in\/souhaiel-morhag\nGitHub: https:\/\/github.com\/Msendpoint\nLicense: MIT\n#>\n\n[CmdletBinding()]\nParam(\n [Parameter(Mandatory=$true, Position=0)]\n [string]$AppleTeamID = \"YOUR_VALUE\",\n\n [Parameter(Mandatory=$true, Position=1)]\n [string]$IntuneProfileID = \"YOUR_VALUE\"\n)\n\ntry {\n # Connects to Microsoft Graph with the required permissions\n Connect-MgGraph -Scopes \"DeviceManagementManagedDevices.ReadWrite.All\"\n \n # Enroll Apple devices using the Graph API endpoint\n $result = Invoke-RestMethod -Uri \"https:\/\/graph.microsoft.com\/v1.0\/deviceManagement\/appleEnrollmentProfiles\/$IntuneProfileID\/devices\/$AppleTeamID\/enroll\" -Method Post\n\n # Output result upon successful enrollment\n Write-Output \"Successfully enrolled devices under Apple Team ID: $AppleTeamID\"\n}\ncatch {\n Write-Error \"Failed to enroll devices: $_\"\n}\nfinally {\n if (-not $result) {\n Write-Output \"No result returned from the Graph API call.\"\n }\n}\n"}]