web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Graph Api - Invalid fi...
Power Automate
Answered

Graph Api - Invalid filter clause: There is an unterminated string literal Error

(0) ShareShare
ReportReport
Posted on by 11

Hi I'm trying to use the graph API to get the email form the outlook using the subject filter. The subject filter is having an "#" (hashtag)  in it eg. "[CMS Case ID: #1040] Case Created Successfully". but the graph API is showing error for "#"  like Invalid filter clause: There is an unterminated string literal at position 25 in 'subject eq '[CMS Case ID:'. Please help me with this issue how can i use the "#" in subject filter.

 

YugesRaj001_0-1714628099960.png

YugesRaj001_1-1714628202579.png

 

Thanks regards,

Yugesraj

 

 

Categories:
  • Verified answer
    v-yueyun-msft Profile Picture
    Microsoft Employee on at

    Hi , @YugesRaj001 

    Please replace the # to  %23 in your side:

    vyueyunmsft_0-1714629308376.png

     

     

    vyueyunmsft_1-1714629329241.png

     

    If this reply can help you , you can click mark this reply as solution (Accept solution) which can help more people, thanks in advance! 

     

    Best Regards,

    Yueyun Zhang

     

     

  • YugesRaj001 Profile Picture
    11 on at

    Hi @v-yueyun-msft  Thank you for your response , I have tried the same but the API is not fetching any emails that is the output is empty , it is  considering "%23" as a string. Can you help me in this.

    YugesRaj001_1-1714630689495.png

     

  • Verified answer
    v-yueyun-msft Profile Picture
    Microsoft Employee on at

    Hi , @YugesRaj001 

    I test it in my side , it can work like this, can you check if you input the correct subject and it contains in your raw return?

    vyueyunmsft_0-1714631000915.png

    If this reply can help you , you can click mark this reply as solution (Accept solution) which can help more people, thanks in advance! 

     

    Best Regards,

    Yueyun Zhang

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 299

#2
11manish Profile Picture

11manish 274 Super User 2026 Season 2

#3
Henil Profile Picture

Henil 119

Last 30 days Overall leaderboard