SlideShare a Scribd company logo
Martina Grom
MVP Office 365
atwork
@magrom
How to (remote) control
Office 365 with Azure
Toni Pohl
MVP Client Dev
atwork
@atwork
Agenda
Why remote control
Demo #1 - AAD
Demo #2 - Office 365 Services
Deploy to Microsoft Azure
See slides & code at blog.atwork.at
Our scenario
Why remote control Office 365?
What do I need for automating?
Using automated SaaS
Why Office 365? Why automation?
Our Mission- How To
Automate Office 365 on your own
Authenticate
as entitled user or app
for the individual service
Authenticate
as entitled user
for our web portal
Decide what the user may
execute in your app
• Create User
• Add to Security Group for SPO
• Send Welcome email
• Provision MySite
• Create Welcome Document
• Add user information into SPO list
• Mailbox statistics
Inspirirani ljudima.
Prerequisites
Office 365 Tenant, Get a free one month trial:
http://office.microsoft.com
Microsoft Azure, Get a 30 day free trial:
http://www.windowsazure.com/en-us/pricing/free-trial
Visual Studio 2013
Inspirirani ljudima.
Demo #1
AAD Authentication/Identities and Helpers
Inspirirani ljudima.
Demo #2
User Provisioning in AAD + SPO + EXCHANGE
How to Access Services
AAD -> Graph API, PowerShell
SPO -> CSOM, REST, PowerShell
Exchange Online -> Managed API, PowerShell
Lync Online -> SDK, PowerShell
New: Office 365 API
Integrating Applications
in Azure Active Directory
Access Level Type Description
Single Sign-On
Default permission. The app is enabled for single sign-on with
Azure AD, and the user token will contain claims such as the
user’s User Principal Name, First and Last Name and unique
identifiers.
Single Sign-On,
Read Directory Data
Single sign-on plus the ability to read directory data using the
Graph API. This allows querying of company, user and group
information.
Single Sign-On,
Read and Write Directory Data
Single sign-on plus the ability to read and write directory data
using the Graph API. This allows querying and writing of
company, user, and group information, but does not allow
deleting users or groups.
http://msdn.microsoft.com/en-us/library/windowsazure/b08d91fa-6a64-4deb-92f4-f5857add9ed8.aspx#BKMK_AccessLevels
Office 365 API Tools - Preview
http://visualstudiogallery.msdn.microsoft.com/7e947621-
ef93-4de7-93d3-d796c43ba34f
Inspirirani ljudima.
Deploy to Azure
What to use when in Microsoft Azure
Access method Azure Website
$
Azure Cloud Service
$$$
AAD  
Exchange EWS  
Exchange PowerShell  
SharePoint CSOM  
SharePoint REST  
SharePoint PowerShell  
Lync SDK  
Lync PowerShell  
Summary
Use GraphAPI for AAD manipulations
Use Office 365 as SaaS
Use Azure as Platform
Call 2 Action
Download slide with links and sample code at
blog.atwork.at
If you´re interested in a ready to use Office 365 solution
delegate365.com
Build great solutions with Office 365! 
Inspirirani ljudima.
Pitanja i odgovori.
Thank you!
Martina Grom
@magrom
Toni Pohl
@atwork
Windays14 - How to (remote) control Office 365 with Azure
Windays14 - How to (remote) control Office 365 with Azure
Inspirirani ljudima.
Links
GraphAPI, SharePoint,
Exchange, Office 365 API,
SDKs, Blogs, …
Graph API Links
Windows Azure Graph API
http://code.msdn.microsoft.com/Graph-API-Authenticate-and-53c6cb92/view/SourceCode
GraphAPI Explorer
https://graphexplorer.cloudapp.net/
MVC Sample App for Windows Azure Active Directory Graph
http://code.msdn.microsoft.com/windowsazure/Write-Sample-App-for-79e55502
Adding Sign-On to Your Web Application Using Windows Azure AD
http://msdn.microsoft.com/en-us/library/windowsazure/dn151790.aspx
Group & Role Claims: Use the Graph API …
http://www.cloudidentity.com/blog/2013/01/22/group-amp-role-claims-use-the-graph-api-to-get-back-isinrole-and-authorize-in-
windows-azure-ad-apps/
MVP Blog – our 4 part series
http://blogs.msdn.com/b/mvpawardprogram/archive/2014/01/20/identity-in-your-own-apps-with-windows-azure-active-
directory.aspx
ADAL for .net
Active Directory Authentication Library (ADAL) v1 for
.NET – General Availability!
(Vittorio Bertocci)
http://www.cloudidentity.com/blog/2013/09/12/active-directory-authentication-library-adal-v1-for-net-general-
availability/
ADAL 1.0 and Windows Store Apps
(Alex Simons) – coming soon
http://blogs.technet.com/b/ad/archive/2013/09/12/active-directory-authentication-library-1-0-for-net-ready-
for-prime-time.aspx
SharePoint
SharePoint Online Management Shell (PS)
http://www.microsoft.com/en-us/download/details.aspx?id=30359
OAuth and remote apps for SharePoint
http://msdn.microsoft.com/en-us/library/office/apps/fp179932.aspx
Office365ClaimsConnector
http://www.codeproject.com/Articles/637378/How-to-Create-a-Windows-8-App-for-SharePoint-Part
OAuth authentication and authorization flow for apps that
ask for access permissions on the fly in SharePoint 2013
http://msdn.microsoft.com/en-us/library/office/apps/jj687470.aspx
Helper for
http://json2csharp.com/
Exchange
Microsoft Exchange Web Services Managed API 2.0
http://www.microsoft.com/en-us/download/details.aspx?id=35371
Getting started with the EWS Managed API
http://msdn.microsoft.com/en-us/library/dd633626(v=exchg.80).aspx
Connect to Exchange Online Using Remote PowerShell
http://technet.microsoft.com/en-us/library/jj984289(v=exchg.150).aspx
Lync
Lync 2013 SDK
http://www.microsoft.com/en-us/download/details.aspx?id=36824
Lync 2013 SDK documentation
http://msdn.microsoft.com/en-us/library/office/jj933180(v=office.15).aspx
Windows PowerShell Module for Lync Online
http://www.microsoft.com/en-us/download/details.aspx?id=39366
Lync PowerShell
http://blogs.office.com/b/office365tech/archive/2013/08/19/remote-powershell-for-lync-online.aspx
Using Windows PowerShell to Manage Lync Online
http://technet.microsoft.com/en-us/library/dn362831.aspx
Office 365 API
Office 365 API
http://visualstudiogallery.msdn.microsoft.com/7e947621-ef93-4de7-93d3-d796c43ba34f
Office 365 ASP.NET MVC and Win8 Sample
http://code.msdn.microsoft.com/Office-365-APIs-Get-41eebcdf

More Related Content

Windays14 - How to (remote) control Office 365 with Azure

  • 1. Martina Grom MVP Office 365 atwork @magrom How to (remote) control Office 365 with Azure Toni Pohl MVP Client Dev atwork @atwork
  • 2. Agenda Why remote control Demo #1 - AAD Demo #2 - Office 365 Services Deploy to Microsoft Azure See slides & code at blog.atwork.at
  • 3. Our scenario Why remote control Office 365? What do I need for automating?
  • 5. Why Office 365? Why automation?
  • 7. Automate Office 365 on your own Authenticate as entitled user or app for the individual service Authenticate as entitled user for our web portal Decide what the user may execute in your app • Create User • Add to Security Group for SPO • Send Welcome email • Provision MySite • Create Welcome Document • Add user information into SPO list • Mailbox statistics
  • 8. Inspirirani ljudima. Prerequisites Office 365 Tenant, Get a free one month trial: http://office.microsoft.com Microsoft Azure, Get a 30 day free trial: http://www.windowsazure.com/en-us/pricing/free-trial Visual Studio 2013
  • 9. Inspirirani ljudima. Demo #1 AAD Authentication/Identities and Helpers
  • 10. Inspirirani ljudima. Demo #2 User Provisioning in AAD + SPO + EXCHANGE
  • 11. How to Access Services AAD -> Graph API, PowerShell SPO -> CSOM, REST, PowerShell Exchange Online -> Managed API, PowerShell Lync Online -> SDK, PowerShell New: Office 365 API
  • 12. Integrating Applications in Azure Active Directory Access Level Type Description Single Sign-On Default permission. The app is enabled for single sign-on with Azure AD, and the user token will contain claims such as the user’s User Principal Name, First and Last Name and unique identifiers. Single Sign-On, Read Directory Data Single sign-on plus the ability to read directory data using the Graph API. This allows querying of company, user and group information. Single Sign-On, Read and Write Directory Data Single sign-on plus the ability to read and write directory data using the Graph API. This allows querying and writing of company, user, and group information, but does not allow deleting users or groups. http://msdn.microsoft.com/en-us/library/windowsazure/b08d91fa-6a64-4deb-92f4-f5857add9ed8.aspx#BKMK_AccessLevels
  • 13. Office 365 API Tools - Preview http://visualstudiogallery.msdn.microsoft.com/7e947621- ef93-4de7-93d3-d796c43ba34f
  • 15. What to use when in Microsoft Azure Access method Azure Website $ Azure Cloud Service $$$ AAD   Exchange EWS   Exchange PowerShell   SharePoint CSOM   SharePoint REST   SharePoint PowerShell   Lync SDK   Lync PowerShell  
  • 16. Summary Use GraphAPI for AAD manipulations Use Office 365 as SaaS Use Azure as Platform
  • 17. Call 2 Action Download slide with links and sample code at blog.atwork.at If you´re interested in a ready to use Office 365 solution delegate365.com Build great solutions with Office 365! 
  • 23. Graph API Links Windows Azure Graph API http://code.msdn.microsoft.com/Graph-API-Authenticate-and-53c6cb92/view/SourceCode GraphAPI Explorer https://graphexplorer.cloudapp.net/ MVC Sample App for Windows Azure Active Directory Graph http://code.msdn.microsoft.com/windowsazure/Write-Sample-App-for-79e55502 Adding Sign-On to Your Web Application Using Windows Azure AD http://msdn.microsoft.com/en-us/library/windowsazure/dn151790.aspx Group & Role Claims: Use the Graph API … http://www.cloudidentity.com/blog/2013/01/22/group-amp-role-claims-use-the-graph-api-to-get-back-isinrole-and-authorize-in- windows-azure-ad-apps/ MVP Blog – our 4 part series http://blogs.msdn.com/b/mvpawardprogram/archive/2014/01/20/identity-in-your-own-apps-with-windows-azure-active- directory.aspx
  • 24. ADAL for .net Active Directory Authentication Library (ADAL) v1 for .NET – General Availability! (Vittorio Bertocci) http://www.cloudidentity.com/blog/2013/09/12/active-directory-authentication-library-adal-v1-for-net-general- availability/ ADAL 1.0 and Windows Store Apps (Alex Simons) – coming soon http://blogs.technet.com/b/ad/archive/2013/09/12/active-directory-authentication-library-1-0-for-net-ready- for-prime-time.aspx
  • 25. SharePoint SharePoint Online Management Shell (PS) http://www.microsoft.com/en-us/download/details.aspx?id=30359 OAuth and remote apps for SharePoint http://msdn.microsoft.com/en-us/library/office/apps/fp179932.aspx Office365ClaimsConnector http://www.codeproject.com/Articles/637378/How-to-Create-a-Windows-8-App-for-SharePoint-Part OAuth authentication and authorization flow for apps that ask for access permissions on the fly in SharePoint 2013 http://msdn.microsoft.com/en-us/library/office/apps/jj687470.aspx Helper for http://json2csharp.com/
  • 26. Exchange Microsoft Exchange Web Services Managed API 2.0 http://www.microsoft.com/en-us/download/details.aspx?id=35371 Getting started with the EWS Managed API http://msdn.microsoft.com/en-us/library/dd633626(v=exchg.80).aspx Connect to Exchange Online Using Remote PowerShell http://technet.microsoft.com/en-us/library/jj984289(v=exchg.150).aspx
  • 27. Lync Lync 2013 SDK http://www.microsoft.com/en-us/download/details.aspx?id=36824 Lync 2013 SDK documentation http://msdn.microsoft.com/en-us/library/office/jj933180(v=office.15).aspx Windows PowerShell Module for Lync Online http://www.microsoft.com/en-us/download/details.aspx?id=39366 Lync PowerShell http://blogs.office.com/b/office365tech/archive/2013/08/19/remote-powershell-for-lync-online.aspx Using Windows PowerShell to Manage Lync Online http://technet.microsoft.com/en-us/library/dn362831.aspx
  • 28. Office 365 API Office 365 API http://visualstudiogallery.msdn.microsoft.com/7e947621-ef93-4de7-93d3-d796c43ba34f Office 365 ASP.NET MVC and Win8 Sample http://code.msdn.microsoft.com/Office-365-APIs-Get-41eebcdf