UTF-8 encoding for V2 workgroups endpoints

Hello everyone,

I am working on an approval scheme extraction script in Powershell and I’ve run into a bit of a problem in regards to special characters & encoding.

When extracting governance group information through the workgroups/{id} and workgroups/{id}/members V2 endpoints, any attributes containing special characters/accents (governance group names, identity display names) are returned incorrectly (i.e. “Å¡” instead of “š”) because the encoding of the JSON response doesn’t seem to be UTF-8.

How can I get the response in a UTF-8 format? In other similar cases, I’ve always solved this by explicitly specifying the UTF-8 charset in the ContentType header of the request, but that doesn’t seem to do anything for these two endpoints. At the same time, if I look at the requests executed in the GUI, the response is correct without any apparent specification of the encoding. Is there anything I’ve missed here?

Thanks in advance.

Hi Prooxie,
I don’t have any specific UTF-8 characters in my IdentityNow instance, but there may be a way for you to investigate what the GUI is doing, and see if you could apply that to your Powershell. All of the API calls that are done in the GUI can be seen in your browser developer tools. For Chrome, just right click on the page, and click Inspect. Then choose the Network tab, and reload ot go to the page you want to see. The API calls will show up, and you can hopefully fid the one you need, along with the Headers you may need.
I usually save it as a HAR file, and view it in a text editor.

Thanks,
Chris

Hi chrisp,

Indeed, this was my first instinct too. I may have not been clear in my original post, but that’s what I already did (hence the “if I look at the requests executed in the GUI, the response is correct without any apparent specification of the encoding”). Unfortunately, there seems to be nothing that would indicate a specific encoding setting in what the UI does.