How to create an open extension in a shared mailbox with delegated permissions

Andrew Earl 105 Reputation points
2024-08-09T07:55:38.8733333+00:00

Hi, I am using Microsoft Graph API via Postman and trying to create an open extension for a message in shared inbox with delegated (rather than application) permissions .

The delegate has given me access to the account in Outlook and I have delegated permissions Mail.ReadWrite.Shared.

When I use the following POST

https://graph.microsoft.com/v1.0/users/******@company.com/messages/{{messageid}}/extensions

{

"@odata.type" : "microsoft.graph.openTypeExtension",

"extensionName" : "Com.{{mydomain}}.test",

"TestId" : 23328,

}

I get the following 403 response

{
    "error": {
        "code": "ErrorAccessDenied",
        "message": "Access is denied. Check credentials and try again."
    }
}

Is it possible to create open extensions in shared mail boxes with delegated permissions, or does this only work with application permissions? Thanks

Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

Accepted answer
  1. Hitesh Pachipulusu - MSFT 3,620 Reputation points Microsoft External Staff
    2024-08-09T08:15:03.4966667+00:00

    Hello @Andrew Earl ,

    Thank you for contacting Microsoft Support!

    It looks like you’re encountering an issue because creating open extensions in shared mailboxes with delegated permissions is not supported. When using delegated permissions, you can only create open extensions for the currently logged-in user.

    To create open extensions for messages in a shared mailbox, you would need to use application permissions instead. Application permissions allow your app to act as itself rather than on behalf of a user, which is necessary for accessing shared mailboxes in this context.

    Hope this helps.

    If the answer is helpful, please click Accept Answer and kindly upvote it. If you have any further questions about this answer, please click Comment.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.