Skip to main content

Notifications

Community site session details

Community site session details

Session Id : +T/lxfg7B7zGrhrWTtxv8X
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!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,670 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,015 Most Valuable Professional

Leaderboard
Loading started