0

I seem to be unable to access the SingleValueExtendedProperties set in my MVC App using the Microsoft Graph API from the recipient account.. When checking the same message in either the senders Sent Items or sending the same message to myself, it all works fine?

The SingleValueExtendedProperties just appear null when trying to access a message sent from an account that differs from the recipient, the exact same code is used for both situations, and the GUID the properties are assigned with is identical.

Here is my generation of the message:

Message newMessage = new Message()
{
    ToRecipients = new List<Recipient>()
    {
        new Recipient() { EmailAddress = recipient }
    },
    Subject = message.Subject,
    Body = new ItemBody()
    {
        Content = message.Content
    },
    SingleValueExtendedProperties = new MessageSingleValueExtendedPropertiesCollectionPage()
    {
        new SingleValueLegacyExtendedProperty()
        {
            Id = String.Format("String {{{0}}} Name {1}", guid, "ValueOne"),
            Value = prop1
        },
            new SingleValueLegacyExtendedProperty()
        {
            Id = String.Format("String {{{0}}} Name {1}", guid, "ValueTwo"),
            Value = prop2
        }
    }
};

And here is my send request:

await client.Me.SendMail(newMessage, true).Request().PostAsync();

And my get request:

var message = await client.Me.Messages[messageId].Request()
    .Expand("singleValueExtendedProperties(
    $filter=id eq 'String {guid} Name ValueOne' or id eq 'String {guid} Name ValueTwo')")
    .GetAsync();

As I said, this all works flawlessly when sending mail to the same account as the sender, or reading the message from the senders Sent Items, but when receiving from a different account to the sender, the singleValueExtendedProperties are always null!

Shawno0
  • 1
  • 1
  • I can only assume that for some reason the SingleValueExtendedProperties are tied to the current user Id in some way.. Does anyone have any info on how I can get around this? – Shawno0 Apr 16 '19 at 12:37
  • Hello, we found out that the data is stored on the instance of the user. Could you find a way to synchronize the data between the different resource instances? – sergej Dec 17 '19 at 17:37

0 Answers0