1
votes

Web application is able to successfully run GET requests but I am getting a 403 Forbidden error when I attempt to run a POST request.

Added 'Delegated - Mail.ReadWrite' permission in app registered in Azure Active Directory.

Using retrofit2:

@POST("/v1.0/me/mailFolders/{folderid}/messages/{messageid}/createReply")
    Call<Result<Message>> createReply(
    @Path("folderid") String folderId,          
    @Path("messageid") String messageId
); 

Expect to get 200 with the Message in the response.

Actual results: 403 Forbidden https://graph.microsoft.com/v1.0/me/mailFolders/{folderid}/messages/{messageid}/createReply

{
    "error": {
    "code": "ErrorAccessDenied",
    "message": "Access is denied. Check credentials and try again.",
    "innerError": {
        "request-id": "04bc9089-4a49-4fe3-8bc2-f7a960343068",
        "date": "2019-08-26T15:49:27"
        }
    }
}
1

1 Answers

0
votes

Updated scope in authorize request to include the permissions and it resolved the issue.