Outlook Add-in displayReplyForm - outlook

I'm creating an Add-in/Add-on for Outlook Mobile. I want to create a "Reply With" plugin so I'm doing: Office.context.mailbox.item.displayReplyForm("Reply").
But I get the response that I don't have enough permissions, this is my how my permission looks like on the manifest.xml:
<Permissions>ReadWriteMailbox</Permissions>
Should't this permission be enough to make the reply?

displayReplyForm() API is not supported on mobile platforms (Android or iOS). https://learn.microsoft.com/en-us/javascript/api/outlook/office.messageread?view=outlook-js-preview#outlook-office-messageread-displayreplyformasync-member(1)
If you need this support, you can raise a request for this. We track Outlook add-in feature requests on our Tech Community Page . Please submit your request there and choose the appropriate label(s). Feature requests on Tech Community are considered, when we go through our planning process.

Related

How can I send push notifications to an outlook add-in from a web server?

Problem
I can't seem to find a reference a suggested way to implement sending notifications from a web server to an outlook add-in.
I've looked on:
the officeJS docs, which have a deprecated entry about notifications rest api v2.0, pointing to the Microsoft Graph, which again is deprecated (but without pointing to any up to date version)
stackoverflow, but the questions were either unanswered, or, answering the question with the deprecated notifications api
the officejs Q&A forum, where someone pointed out the Azure Notifications Hub service, but only linked to an android example; but the docs state that it's primarily made to send messages to mobile devices officejs add-ins as a tutorial or reference
Could you help me understand what's the best way to implement push notifications from web server -> outlook add-in?
Context
I personally would like to use Firebase Cloud Messaging, which depends on the Push API under the hood. Is the Push API supported?
WebSockets could also work, but here again I wasn't able to find something before working away on an implementation
#nickromano is correct in that an add-in is just a webpage embedded in Outlook, so you may be able to send data to it through websockets or long polling outside of a standard request. However, this is not a supported use case scenario.
Web add-ins are not run all the time in Outlook. They are activated in reaction to any event or by users (for example, when a task pane is opened). Moreover, Outlook add-ins are working under the context of the currently selected item(s) only. So, your add-in should be activated if you want to receive any push notifications (by opening a task pane or any event).
Be aware, feature requests on Tech Community are considered, when the dev team go through the planning process. Use the github label: “Type: product feature request” at https://aka.ms/M365dev-suggestions .

Listing All Emails in Inbox by Outlook Web Addin

I am able to get details of previewed email by this JavaScript command:
console.log(Office.context.mailbox.item);
But I need to list all emails in the inbox (not only previewed one) by using Office JS, is it possible, if so how can I do it? (Its also okay receiving details from specified ID or e-mail number, if possible.)
Thanks!
No, it is not possible. Office web add-ins work under the context of currently selected item in Outlook only. If you need to access other items in the user's mailbox I'd suggest using Graph API, see Outlook mail API overview and Authorize to Microsoft Graph with SSO for more information.
Also you don't forget that VSTO based add-ins allows dealing with all items in Outlook stores. See Walkthrough: Create your first VSTO Add-in for Outlook for more information.
Feature requests on Tech Community are considered, when the dev team go through the planning process. Use the github label: “Type: product feature request” at https://aka.ms/M365dev-suggestions .

Outlook Add-in REST API deprecation

We are retrieving the email and attachments using the oAuth token from getCallbackTokenAsync in office.js JavaScript library and sending the token to the web application to retrieve them from EWS (~/EWS/Exchange.asmx) using SOAP request similar to the approach shown in https://learn.microsoft.com/en-us/office/dev/add-ins/outlook/get-attachments-of-an-outlook-item
Could anyone please confirm that the deprecation of Outlook Rest API 2.0 will not affect the existing functionality. I am new to the Outlook add-in development and the documentation seems vast to digest.
https://devblogs.microsoft.com/microsoft365dev/outlook-rest-api-v2-0-deprecation-notice/
Do we need to register the add-in anywhere OR provide any permissions to the add-in specifically for getCallbackTokenAsync method to retrieve the token OR making the SOAP request to download attachments.
EWS remains unchanged for Outlook web add-ins. Make sure that you don't use the isRest option for the getCallbackTokenAsync call.
Take a look at the recent Office add-ins community call where this question was discussed in depth. Here is a screenshot for others:

Outlook Web Add-in using REST API slow to refresh in Outlook for Windows

I am working on an Outlook add-in that uses the Outlook REST API extensively ... this works great in Outlook for the Web. It's very responsive and when I take an action against the REST API the UI updates almost instantaneously.
However, the same add-in when used in Outlook for Windows, has an extremely poor user experience. When I click a button to take an action, the action happens against the mailbox almost instantaneously (I can see it refresh in the web client open at the same time) but it can take 5-10 seconds before the UI on the full Outlook client updates.
Is there anything I can do to force the Outlook client to refresh the same way as Outlook web client or is this just a deficiency of the full Outlook?
Update:
I've created a side-by-side video of the full client and web client showing what I mean - https://www.youtube.com/watch?v=RGEskXTt7S4
By default the rich native Outlook client uses Cached Exchange Mode for a better overall user experience. This means that the rich native client relies on a local cache which gets updated periodically. The online/web client, however, is always online. Since you are making a REST call to the server, the web client will pick up the changes faster. After a few seconds, those changes will be pulled to the native client. There are also other differences between the rich client and the web client that could contribute in the delay you are experiencing. This delay will be observed for almost any REST call to make changes to the mailbox.
One way to address this issue is an Outlook add-in API which acts directly on the client. Unfortunately, we don't have such an API. We have a UserVoice page for tracking Outlook add-in feature requests. Please add a request there. Feature requests on UserVoice are considered when we go through our planning process.

can't send messages to created bot?

Okay, so, I'm trying to create a QnA bot with Azure and Microsoft Bot Framework. I think I managed to create it and got it linked to Teams, but when I go to Teams to test it, it gives me this message in the chat box:
"Sending new messages to this bot has been disabled by your administrator."
I'm not sure what I did wrong or how to fix it. I'm also not sure how I can link a bot I made with QnA Maker into the bot I just created with Azure. The tutorials I found online all talk about using Bot Service (preview) in Azure, but I can't choose that one from the available list.
Thanks in advance
Your Tenant Admin needs to go to the Teams Admin Centre:
Open the Teams Apps pulldown
Select Permission Policies
Click the "Org-wide app setttings" button in the top RH corner.
This shortcut will get them there: admin.teams.microsoft.com/policies/app-permission
From Org-wide app settings turn on one (or both?) of "Allow third party or custom apps", or just "Custom apps" (I'm not sure which it is these days) and then click Save.
Be aware that replication delays could take some hours or even overnight before this change manifests to you as a user though.
This is because your Office 365 admin has not enabled side-loading of Apps in MS-Teams for your user.
Ask the Admin to allow Side-Loading of Apps for you in the Admin console on the O365 dashboard.
I had the same problem. The tutorial is old
In Azure Portal, When creating, try to go to
AI + Machine Learning > Web App Bot
And Select Q&A if you are using QnA.
Then in Application Settings, scroll down and you will find
QnAKnowledgebaseId(1)
QnAAuthKey(2)
QnAEndpointHostName(3)
You put all the information you get from QnA
POST /knowledgebases/(1)xxxxxxxx/generateAnswer
Host: (3)https://xxxxxx
Authorization: QnAEndpointKey (2)xxxxxx
Content-Type: application/json
{"question":"<Your question>"}
I've had the same problem, it seems like the administrator needs to allow sideloading of apps.
see here:
https://learn.microsoft.com/en-US/microsoftteams/teams-app-permission-policies

Resources