I’m trying to make a call to graph.microsoft in a workflow step, but it fails due to single quotes I need in the filter clause.
The URL is: https://graph.microsoft.com/v1.0/directoryRoles?$filter=roleTemplateId eq ‘88d8e3e3-8f55-4a1e-953a-9b9898b8876b’
I’ve used two versions of variables. The first creates the whole URL in the “Define Variable” step like this:
{
"name": "Create GET Url",
"description": "Create the url string for getting the Entra role id.",
"transforms": [
{
"id": "sp:transform:concatenate:string",
"input": {
"variableB.$": "$.loop.loopInput"
}
},
{
"id": "sp:transform:concatenate:string",
"input": {
"variableB": "'"
}
}
],
"variableA": "https://graph.microsoft.com/v1.0/directoryRoles?$filter=roleTemplateId eq '"
}
Alternatively, I’ve tried using: https://graph.microsoft.com/v1.0/directoryRoles?$filter=roleTemplateId eq ‘{{$.loop.loopInput}}’
I’ll need to use a variable of some kind, but I did verify that hardcoding the URL into the step also returns the same error, which is what convinces me that the issue is the single quotes. I did see another post regarding something similar and I tried typing in the URL (not using copy/paste) but nothing has worked.
The workflow works as expected when I hardcode: https://graph.microsoft.com/v1.0/directoryRoles/a8bd263e-cbd8-40d7-b032-20f15bdd45dd
Please note, I know the role ID in the last URL is different than supplied in the other URL. Another annoyance is that IdentityNow uses the roleTemplateId for the Entra ID role instead of the actual ID, so I’m trying to fetch the id using the GET call.
Can anyone help me understand why this won’t work??