You need to authenticate first - I expect that's in your python script. You can't just call the commands like you are trying to do on a URL line in a browser.
The browser prompts for autentication. I'm a global admin.
true.. why not use the API explorer then to test your command? My gut tells me it's the single quotes.
The parameters you pass in the URL need to be encoded so that the browser can send them. URLs can't have spaces in them, and most other non-alphanumeric characters will also not work. For example, the userDn parameter should be:
After encoding each of the parameters individually, you get this final URL:
So, how do you encode the URL? There are lots of tools to help with this, both manual and scripted. For the occasional manual task, you can use a website such as this one. First, remove the quotes around the value, and any extra spaces (such as, I assume, the one in "OU=Office "). Then paste just the value of the parameter (not the name) into the edit box, and click "Encode". Paste the result into your URL. Do this for each parameter. You'll find that letters and numbers stay the same, but that most other symbols are replaced with some %xx value.
It's quite a bit easier to do this with a script instead. Python, in particular, makes this very easy, and handles the encoding and decoding of values without you even knowing it's happening. Of course, you'll have to pick up a bit of Python, but it's not too bad. You can find a bit more info on the Python client here:
- The ePO 4.6.0 Scripting Guide
- Download the McAfee Python Client
- Get the Python language (Version 2. The client isn't supported for Python v3.x yet)
Awesome Dan! Thanks, I have it working in Python, just through the browser was giving me grief.