Skip to main content

Notifications

Community site session details
Power Automate - General Discussion
Answered

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

Like (0) ShareShare
ReportReport
Posted on 2 May 2024 05:40:33 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

 

 

  • Verified answer
    v-yueyun-msft Profile Picture
    on 02 May 2024 at 06:23:34
    Re: Graph Api - Invalid filter clause: There is an unterminated string literal Error

    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

     

     

  • YugesRaj001 Profile Picture
    11 on 02 May 2024 at 06:20:49
    Re: Graph Api - Invalid filter clause: There is an unterminated string literal Error

    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
    on 02 May 2024 at 05:55:35
    Re: Graph Api - Invalid filter clause: There is an unterminated string literal Error

    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

     

     

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - General Discussion

#1
rpersad Profile Picture

rpersad 16

#2
David_MA Profile Picture

David_MA 10 Super User 2025 Season 1

#3
Michael E. Gernaey Profile Picture

Michael E. Gernaey 8 Super User 2025 Season 1

Overall leaderboard
Loading started
Loading started