Hey MacJunior,
Bit late to this thread but if you want the specific users' applications a good way to do this would be using an API call.
If you use a GET request you can fetch the Mac user and inventory data and organize the response in a legible way (usually I prefer to do Json format). You can also filter the grouping of this data by user department or position for further legibility.
The API endpoint I've used within PowerShell in the past specifically for this has been:
$UserPosition = "position" //Specify which position to look for users in.
$YourJamfURL = "yourjamf.jamfcloud.com"
$endPoint = "api/v1/computers-inventory?section=USER_AND_LOCATION§ion=APPLICATIONS§ion=HARDWARE&page=0&page-size=150&sort=general.name%3Aasc&filter=userAndLocation.position%3D%3D%22$userPosition%22"
$fullUrl = "https://$YourJamfURL/$endpoint"
$ApiResponse = Invoke-RestMethod -Uri $fullUrl -Headers @{Authorization = "Bearer $apiToken"; accept = "application/json" } -Method Get //This will return a PSCustomObject that is segmented the same way in which the json file is laid out.
Please note you need to verify your Jamf API user credentials and generate an access token to make the GET request.
Hey MacJunior,
Bit late to this thread but if you want the specific users' applications a good way to do this would be using an API call.
If you use a GET request you can fetch the Mac user and inventory data and organize the response in a legible way (usually I prefer to do Json format). You can also filter the grouping of this data by user department or position for further legibility.
The API endpoint I've used within PowerShell in the past specifically for this has been:
$UserPosition = "position" //Specify which position to look for users in.
$YourJamfURL = "yourjamf.jamfcloud.com"
$endPoint = "api/v1/computers-inventory?section=USER_AND_LOCATION§ion=APPLICATIONS§ion=HARDWARE&page=0&page-size=150&sort=general.name%3Aasc&filter=userAndLocation.position%3D%3D%22$userPosition%22"
$fullUrl = "https://$YourJamfURL/$endpoint"
$ApiResponse = Invoke-RestMethod -Uri $fullUrl -Headers @{Authorization = "Bearer $apiToken"; accept = "application/json" } -Method Get //This will return a PSCustomObject that is segmented the same way in which the json file is laid out.
Please note you need to verify your Jamf API user credentials and generate an access token to make the GET request.
Forgot to mention that this query returns the applications data for ALL specified users within the position.
Additionally I made a typo, "$userPosition" variable should actually be "$UserPosition".