Programatic Access to Company Shared Outlook Contacts in Web App - outlook

I have created a public folder mailbox and a root public folder for our organization in Office 365. I've also created a Shared Contacts folder in Outlook and added a couple of contacts.
Now I want to be able to programatically access these shared contacts (list, view, add, remove) in our web application, an SPA written in Angular4.
We are already authenticating against Azure AD, and we are already pulling information from MS Graph. However I don't see any way to access public folders in Graph.
How can I access these shared contacts in our web app? I'm open to using something other than MS Graph, if there is another REST API that does what I need.

As far as I know, public folder access is still not available through the Graph API (or any other REST API).
You need to use Exchange Web Services (EWS).
Public folder access with EWS is described at https://msdn.microsoft.com/library/office/jj945067(v=exchg.150).aspx.

Related

Reading/Writing M365 Admin contacts

An administrator for a Microsoft 365 domain can create external contacts that are visible to users within that domain. Those contacts can be seen in the M365 Outlook client under "Directory->All Contacts" or "Directory->Default Global Address list".
I need to use EWS to read and create these contacts. As a first step I'm just trying to read them, using FindFolder, against MsgFolderRoot of a user. Unfortunately the only contact folders that show up are the ones defined for the user in question, not the external contacts created by the Admin. There are several contact folder classes that seem promising, such as "OrganizationalContacts" and "ExternalContacts" but there are no entries in those folders.
I could also use Graph for this if the capability is there. Any help on this problem would be appreciated.
Directory contacts exist in the Directory eg Azure AD or the local AD onPrem neither EWS or Graph can create these type of contacts then only thing automatable that can do that is https://learn.microsoft.com/en-us/powershell/module/exchange/new-mailcontact?view=exchange-ps
For reading Directory contacts the Graph is a better option it has a supportable endpoint via https://learn.microsoft.com/en-us/graph/api/resources/orgcontact?view=graph-rest-1.0. EWS can do this via FindPeople but it's not documented and requires that you know the addressbook guid which isn't available via EWS.

Is it possible to create public folder mailbox via EWS using SOAP request?

I cannot find any solution (SOAP request) to create public folder mailbox via EWS.
No all public folder provisioning needs to be done using the either the EAC or the Exchange Management Shell cmldets. EWS is a client access API not a managed API so you can do thing a client could do (eg Create a New Folder, Set permission on that folder if you have rights, CRUD item actions) etc.
If you need to do public provisioning programatically then look at executing the cmdlets through managed code eg https://learn.microsoft.com/en-us/previous-versions/office/developer/exchange-server-2010/ff326159(v%3Dexchg.140)
You should also consider the underlying infrastructure and how any why your creating secondary public folder Mailboxes (eg generally because of the size of the content). Eg the one thing you can't do in EWS is create a Public Folder on a particular Public Folder Mailbox etc that also need to be done via the EMS.

Whether Outlook SDK be able to access Office365 User data? Or Microsoft Graph API be able to access Live.com users?

Whether OutlookSDK at dev.outlook.com could access Office365 user data (calendars, contacts, mail)?
How's about Microsoft Graph API, could them be able access live.com users? (calendars, contacts, tasks, mail)?
I'm curious at this point, want to know what SDK is best for accessing both live.com user data and Office365 user data.
I already try Microsoft Graph API iOS SDK to authenticate Live Id user, but couldn't success, only able to authenticate Office365 user
OutlookSDK as well, unable to authenticate Office365 user, only able to authenticate Live ID
Thanks.
Carefully take a look at the instructions here: https://dev.outlook.com/RestGettingStarted/Overview
To write an app against both Office 365 and outlook.com you will need to register your application in the new application registration portal here: https://apps.dev.microsoft.com/Disambiguation?ru=https%3a%2f%2fapps.dev.microsoft.com%2f
Additionally you will need to make sure that your Outlook.com account has been upgraded to the new service. If it has not, then you will need to follow the instructions to request an account in the preview service from: outlookdev#microsoft.com or create a new account which should automatically be provisioned in the new service.
Yes - You can use Outlook APIs to access mail, calendars, and contacts for Office 365 users and Outlook.com
Also, You can use the Microsoft Graph API to access fixed entities like users, groups, mail, messages, calendars, tasks, and notes coming from services like Outlook, OneDrive, Azure Active Directory, Planner, OneNote and others.
I suggest using O365 APIs to do Live id user authentication - https://msdn.microsoft.com/en-us/office/office365/api/
Check this link as well: http://dev.office.com/getting-started/office365apis

Google Api Service Account authentication access to developers data

I want to develop an application that uses the Picasa Google API for uploading images to my own account. I've already created the Service Account from the API Console and have created the code to upload the image (which works correctly given a valid access_token obtained from the OAuth2 playground).
However, when trying to obtain an access_token with the Google-api php library, this one doesn't seem to be associated to my own username (obviously, no consent screen), which throws me a 404 Not found error message when trying to access data from my personal account.
From what I've read over at https://developers.google.com/api-client-library/php/auth/service-accounts I could create an apps account to setup permissions for a whole domain. Is this, however, necessary given that I only want to access information from my own account? (the same I used to register the application in the API console). Couldn't this be done beforehand using API panel?
A service account is not you and does not by default have access to any data. Think of a service account as a dummy user. If you take the service account email address and add it as a user on a folder in your google drive it will have access to that folder on google drive. If you take the service account email address and give it access to one of your calendars on Google Calendar it will have access to the calendar.
If you set the album public I suspect it will then have access to the album. I did some Googleing and I cant see how you can add another users email address to an album on picasa.
I suggest you try using Oauth2.

Developing an external Google drive sdk application

Im quite new to developing apps that make use of google drive and google api in general. I would like to know whether it is possible to have an application that exposes files saved on google drive without users having to login to their own google drive account. So in a sense the app would have an account and would list the documents that are currently stored on drive and users would be able to click on them ( via Google picker and not Drive UI) and view them.
Note: The app is an external ASP.NET MVC web application.
I've looked at all the authentication samples available (DrEdit etc) on the Google dev site but now of them seem to address my problem.
Seems like you could manually run through the authentication against your own Drive account, and then store the initial access token and refresh tokens in your CredentialStore implementation, which your app will continue to use.
CredentialStore is from the Java API - I'm sure there are equivalents in the .NET API.

Resources