1
votes

I am just starting to use the O365 apis, so forgive me if this is a dumb question.

The samples I have seen so far uses manual login/authentication to the O365 account by a person. I need to Connect to SharePoint Online from a backend service that will provide New records to a list.

Is there a way for an unattended backend Application to authenticate With O365 without the need for a user to enter credentials each time?

1

1 Answers

1
votes

You're describing the code grant authorization flow, which allows the app to act as a delegate for a single user and requires user login. You can also use the client credential flow, which allows an organization admin to login once to consent to the app for all users in the org. However, this is only or Exchange Online right now, SharePoint hasn't enabled client credential flow yet. (At least, there are no entries in the Application Permissions drop down in Azure Management Portal) Info and .NET sample here:

http://blogs.msdn.com/b/exchangedev/archive/2015/01/21/building-demon-or-service-apps-with-office-365-mail-calendar-and-contacts-apis-oauth2-client-credential-flow.aspx

Python sample here:

http://blogs.msdn.com/b/exchangedev/archive/2015/02/10/client-credentials-flow-for-mail-api-in-python.aspx