I have a script that updates certain policies via the Casper API. These policies are scoped to multiple smart groups in multiple sites.
During testing, where I didn't have multiple sites, everything worked fine. But in production, I get some strange behavior:
- The API policy PUT call returns "Error: ComputerGroup (ID:xxx, Name:Blahblahblah) is enabled for a site."
- Subsequent GET calls on the policy return updated information, as though the PUT succeeded.
- The updated information is NEVER reflected in the JSS.
- After some time, API GETs again return the old information, confirming the original failure.
Why is this failing? Why does it matter if a smart group is site-enabled in the first place? Why is the API returning false data?
Any ideas?
I'm hoping someone has seen this before. If not, I'll try to create a simplified, generic script to share that reproduces the problem.