Forum Discussion

k3rz0rg's avatar
k3rz0rg
Advocate III
4 years ago
Solved

How to use apostrophe (') in REST API url for weird email address!

Hi everyone,

 

I was trying to bulk remove a users from specific workspaces and using REST API (Admin - Groups DeleteUserAsAdmin) through powershell and putting the url after -url 'the api url' -method delete.

now the problem is the user has a weird email address like ab.c'[email protected] and cannot use this in the url since that apostrophe in the email end the url before [email protected] and the call becomes invalid. For example:

it supposed to be -url 'https://api.powerbi.com/v1.0/myorg/admin/groups/{groupId}/users/ab.c'[email protected]' but it becomes

-url 'https://api.powerbi.com/v1.0/myorg/admin/groups/{groupId}/users/ab.c'[email protected]' 

because that apostrophe after ab.c finishes the url code early.

 

Can somebody please give me any idea how to handle that apostrophe in the middle of API url code?

Also not sure if it's the right section for this request since this is not a desktop one but power bi service.

 

Thanks!

4 Replies