access contacts in outlook using Script lab - outlook

can Oauth be used in script lab(custom made) for authentication and can it be used to access and fetch outlook contacts ?
if yes then how is it possible ?

Outlook web add-ins work under the context of currently selected item in Outlook. So, the ScriptLab add-in was developed for playing with APIs for the current item (OfficeJS) and getting sample pieces of code. If you need to access other items/contacts I'd suggest using MS Graph API instead or EWS (discontinued with a time) as well as Outlook REST API.

Related

exporting contacts of outlook into excel/sharepoint using outlook add in

I am working in a project where i have to access outlook contacts and have to give specific domain-name and export into sharepoint list or excel sheet .
i wonder if outlook REST api be usefull to access contacts and if accessible will i be able to compare the inputted domain name with other contacts in outlook and export through a click in excel .
is there any other way i can do this project using "add in" only
please note:-(yes there are many ways we can export the excel sheet and all but i want to automate this thing using an "add in")
Outlook web add-ins work under the context of currently selected item in Outlook only. To access other item you may consider using Microsoft Graph API which is a RESTful web API that enables you to access Microsoft Cloud service resources.
See Outlook personal contacts API overview for more information about contacts API.

Outlook REST API - Application Permissions or Background Services

I'm currently using Microsoft Graph, but have been running into its limitation on the request size. Seeing as how the Outlook REST API doesn't have that limitation and is supposed to be very similar to the Graph API for mail related functions, I wanted to use the Outlook API for sending messages with larger attachments.
But is there a way to get application level permissions with the Outlook REST API? Or make calls without a user? The authentication approach I'm using with Microsoft Graph is the one outlined at https://learn.microsoft.com/en-us/graph/auth-v2-service and it would be nice to be able to do the same with the Outlook API.
My app is registered at the Microsoft Application Registration Portal, but the permissions there are only for Microsoft Graph. I have seen an article that mentions being able to edit the manifest in order to get permissions working with other APIs (like the Outlook API), but wasn't too sure about that.

Enumerating contacts and calendar events within an Outlook add-in?

I'm researching requirements for a new Outlook add-in. I'd like to determine if the current version of the JavaScript API allows add-ins to enumerate all of the current user's contacts and calendar events. I need to sync these contacts and events against a third-party system using a REST API.
Is a "get contacts" and/or "get events" (bounded by a date) query possible using the native Outlook add-in JavaScript API?
I'd prefer to do this using the native JavaScript API, but this could be something more suited to an Exchange Web Services call. Something involving makeEwsRequestAsync, perhaps?
The Mailbox API doesn't have any methods for accessing data beyond the context of the current item that the add-in is activated for. So yes, EWS is an option, as well as the Outlook REST APIs.
EWS can be quite difficult to work with, as the XML requests and responses are time consuming to work with (one typo and you're screwed). I would recommend the REST APIs instead.

Accessing Appointments in Outlook without ActiveX

I'm currently working on a project where I'm sending and updating Appointsments. I would like to do this without the use of ActiveX since I don't want to be limited to IE. I've been googeling for quite some time now, but I couldn't find anything that helped, so here's my question. Is there any way I can access or update appointments without the use of ActiveX.
We also have access to the OutlookWebApp, so maybe there's an interface there. Would be great if someone had an idea. Thanks in advance and
Greetings Chris
You can use Exchange Web Services (web or desktop app) or the EWS Managed API (desktop app only) to access data in Exchange Mailboxes: https://msdn.microsoft.com/en-us/library/office/jj162981.aspx.
If you are working with Office 365 mailboxes you can use the Outlook REST or Microsoft Graph APIs: https://dev.outlook.com/
If your solution requires a UI in Outlook Online (OWA) then you can access contextual data (i.e. the current email or appointment) with an Outlook Add-in (you can use EWS requests from it as well): https://dev.outlook.com/reference/add-ins/

Move/Delete Emails in an Office 365 add-in

I have an Outlook 2013 add-in that I'm developing. Its very simple - it forwards the selected email as an attachment to a specific address and then it deletes the email selected. (Really just moves it to the recycle bin).
If our organization upgrades to Office 365, is there anyway to replicate that functionality with the 'new' add-ins? The javascript API's don't seem to give any way of moving emails to other folders or otherwise 'deleting' them.
https://msdn.microsoft.com/en-us/library/office/fp142185.aspx
Is there another method/API for developing add-ins for Outlook 365?
Thanks!
Mail Apps are run in the context of items and JavaScript API for Office doesn't provide any methods for that. You need to use EWS or Office 365 API for getting the job done. Also see EWS Managed API, EWS, and web services in Exchange for more information.

Resources