Search code examples
office365office365apioffice365-apps

Posting Rules to a Share Inbox through Graph API - Permissions Error


When creating a POST call to create an inbox rule for a shared inbox, I follow the Docs explicitly, but I continue to get Permission errors. I have been using the Graph Explorer to test my code.

I am the Org Admin, I have verified I have the recommended permission: MailboxSettings.ReadWrite assigned, but still no luck.

I've walked through the documentation with no success. I can see my own inbox's rules, but cannot see (or post) to anyone else's.

POST /users/{id | userPrincipalName}/mailFolders/inbox/messageRules
Content-type: application/json

{
    "displayName": "[Client Name]",
    "sequence": 1,
    "isEnabled": true,
    "conditions": { "subjectContains": [ "[Client Name]" ] },

    "actions": { "moveToFolder": "[folder ID]", "stopProcessingRules": true}
}

Expected: A rule is created that looks at the subject line of incoming message in shared inbox. If it finds a [Client Name], it will move it to the corresponding sub folder ([folder ID]).

My permission is denied everytime I submit the call.


Solution

  • I think it's just a bug. Have a look at this similar problem description.