Graph Moderate Mail

zi2zi 21 Reputation points
2022-03-02T04:21:54.327+00:00

Hi,

I would like to proceed moderated mail using Graph API.

I refered the url for it below.

It is working to approve or reject moderated mail. But I don't know how to check the mail was approved or rejected.

I tried to find some flag value to distinguish it, but i couldn't.

I would like to display the mail was approved or rejected in my application like Micosoft 365 Mail.

179118-image.png

please give me some guide.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,445 questions
0 comments No comments
{count} votes

Accepted answer
  1. Glen Scales 4,431 Reputation points
    2022-03-03T00:05:28.777+00:00

    That information comes from 3 extended properties that are set on the message eg

    179377-image.png

    So you can use a patch to update those properties yourself eg

    PATCH https://graph.microsoft.com/v1.0/users('gscales@datarumble.com')/Messages/AAb7CR....  
    User-Agent: GraphBasicsPs101  
    Content-Type: Application/json  
    Host: graph.microsoft.com  
    Content-Length: 922  
      
    {  
        "singleValueExtendedProperties":  [  
                                              {  
                                                  "id":  "String {41F28F13-83F4-4114-A584-EEDB5A6B0BFF} Name ApprovalDecisionMaker",  
                                                  "value":  "Dave Dobbin"  
                                              },  
                                              {  
                                                  "id":  "SystemTime {41F28F13-83F4-4114-A584-EEDB5A6B0BFF} Name ApprovalDecisionTime",  
                                                  "value":  "2022-03-03T10:52:57.3068905+11:00"  
                                              },  
                                              {  
                                                  "id":  "Integer {41F28F13-83F4-4114-A584-EEDB5A6B0BFF} Name ApprovalDecision",  
                                                  "value":  "1"  
                                              }  
                                          ]  
    }  
    

1 additional answer

Sort by: Most helpful
  1. Glen Scales 4,431 Reputation points
    2022-03-03T23:00:53.187+00:00

    Which email are you looking at ? these properties are valid on the approval request email (eg the one you show in your screenshot) so it would tell you whether that approval request was approved or rejected. On the actual message that goes to the user it doesn't tell you, from a user perspective they don't know that moderation has occurred