In this quick tip, lets see how to handle special characters while querying the Dataverse Web API.
Assume that you have a Dataverse Team with name CoE&Feb&Makers as below and you would want to query the Team by ‘Team Name’ using Dataverse Web API.

Query Dataverse Web API:
- To query the ‘Team’ record with name CoE&Feb&Makers using Web API, we can form the URL as below and execute from the browser.

- When you hit the URL, you will get an exception that ‘The query parameter is not supported‘. This is because the team name CoE&Feb&Makers is having & symbol, which is not supported.
- To fix this, you need to encode the team’s name. You can use online editor to encode, if you are querying the Web API from browser.

- Now use the encoded value CoE%26Feb%26Makers in the Filter and you should get the result.

- Use HttpUtility.UrlEncode method to encode, if you are querying the Dataverse Web API using C#.
🙂


![[Step by Step] Beginner : Create a PCF control and add it to a custom page](https://rajeevpentyala.com/wp-content/uploads/2024/12/image-49.png)
Leave a reply to The Techie Dood Cancel reply