Hi @Michael Fleet ,
If there is any apostrophes in names you can use below action which makes the logic app call the api correctly:
replace(nameofuser or userprincipalname, '''', '''''')}
Then changed it like below to make it work:
https://graph.microsoft.com/v1.0/deviceManagement/managedDevices?$select=azureADDeviceId&$filter=startswith(userPrincipalName,replace(colleen.o'******@barnardos.org.uk, '''', ''''''))
If this answer was helpful, please click "Accept the answer" and mark Yes
, as this can help other community members.
If you have any other questions or are still experiencing issues, feel free to ask in the "comments" section, and I'd be happy to help.