Microsoft Active Directory V2 spoke action fails with "Unterminated object literal" errorIssue You may see the Microsoft Active Directory V2 spoke action, such as "Disable User" or "Look up User", fail with an Unterminated object literal error. Flows that call the spoke action fail when the MID Server returns a response the spoke cannot parse. The failure can affect every flow that uses the spoke. Symptoms Eroor: Unterminated object literal,Detail: Unterminated object literal Release ANY Cause The spoke runs a PowerShell script on the MID Server and expects the script to return valid JSON. When the script output is not valid JSON, the spoke cannot parse the response and returns the Unterminated object literal error. Common causes include the MID Server being unavailable or unstable, and script output that includes extra text, such as warnings or debug messages, alongside the JSON data. Resolution Confirm that the MID Server is up. Navigate to MID Server > Servers, and click the MID Server name. Confirm that the status is Up and the MID Server is validated.Enable debug logging on the MID Server. Open the MID Server record, and add a parameter named mid.log.debug with the value true. Note: This step requires ServiceNow instance administrator access.Test the spoke action, such as "Disable User", with a test user. Review the MID Server logs for the response returned by the PowerShell script. Example response body received from mid server when running powershell script"{"body": {" Run the PowerShell script directly on the MID Server host, using the same command the spoke uses. If the output is an invalid JSON, Please work with your Mid Server Team as this issue is coming from Mid server. Run the spoke action again, and confirm that the error no longer appears.