The document compares the Office 365 API and SharePoint app models. It provides an overview of developing apps that consume the Office 365 API, including registering apps in Azure AD, authentication and authorization flows, and using the .NET and JavaScript client libraries. It also demonstrates how to use the API to access Exchange, SharePoint, and Azure AD services through code examples for sending emails, managing contacts, working with files, and more.
ESPC15 - Extending Authentication and AuthorizationEdin Kapic
My talk from European SharePoint Conference 2015 in Stockholm about how to extend SharePoint authentication and authorization using federated authentication and custom claim providers.
Understanding SharePoint Apps, authentication and authorization infrastructur...SPC Adriatics
This session will teach you everything that you need to know in order to understand SharePoint Apps, authentication and authorization. Learn about the different type of Apps, the underlying Apps architecture and how to configure an on-premises environment to support Apps. Also you will learn about the different authentications options available for integrating apps, devices, and applications for on-prem scenarios, in the cloud and hybrid.
ESPC15 - Extending Authentication and AuthorizationEdin Kapic
My talk from European SharePoint Conference 2015 in Stockholm about how to extend SharePoint authentication and authorization using federated authentication and custom claim providers.
Understanding SharePoint Apps, authentication and authorization infrastructur...SPC Adriatics
This session will teach you everything that you need to know in order to understand SharePoint Apps, authentication and authorization. Learn about the different type of Apps, the underlying Apps architecture and how to configure an on-premises environment to support Apps. Also you will learn about the different authentications options available for integrating apps, devices, and applications for on-prem scenarios, in the cloud and hybrid.
In this session we will go through new and extended functions in the User Profile area. We will cover the planning and implementation from the organizational to the technical perspective, not only in theory but also in the live demo.
Aleksandar Drašković
Azure AD B2C Webinar Series: Custom Policies Part 1Vinu Gunasekaran
Agenda:
Introducing Custom Policies in Azure AD B2C
Custom Policy Components
Relying Party and User Journeys
Claims Definitions
Technical Profiles
Getting Started with Azure AD B2C Custom Policies
This slidedeck provides a technical deep dive about Active Directory Federation Services technology for federated authentication with Office 365 and other relying parties.
Azure AD B2C Webinar Series: Custom Policies Part 2 Policy WalkthroughVinu Gunasekaran
Agenda:
Reviewing the Exercise – Collect a Loyalty Number from your Customers
Getting Started with Azure AD B2C Custom Policies
Setting up the Policy
Defining the Loyalty Number Claim
Configuring Profile Editing to Include the Loyalty Number
Configure Reading and Writing the Claim
Updating the User Journey
Relying Party Declaration Updates
T28 implementing adfs and hybrid share point Thorbjørn Værp
European SharePoint Conference 2014 in Barcelona.
Presentation Description:
In this session we look at modern forms of authentication . We’ll cover Windows Server Active Directory Federation Services (ADFS) concepts and look at federation with SharePoint. There are a number of difficulties that you’ll need to overcome implementing SAML claims with SP, for example people picker, user profile import, problematic use of some SharePoint apps. We’ll also cover the infrastructure side like making it work with host named site collections, reverse proxy servers and other user directories. Moving to the cloud we’ll look at the authentication architecture of the standards employed; like OAUTH, WS-* and OpenID Connect.
Presentation Benefit
Get a better understanding of Windows Server Active Directory Federation Services (ADFS) concepts and SAML claims connection with SharePoint.
You will learn...
Understand authentication architecture and standards employed.
ADFS concepts
How to implement SAML claims
Slide deck from Azure Saturday Munich 2019. Describing basics of online identity management and federation. But also capabilities of Azure AD B2C - from open standards protocols support (like OAuth and OpenID Connect) to building complex identity flows with Identity Experience Framework
In this session we will go through new and extended functions in the User Profile area. We will cover the planning and implementation from the organizational to the technical perspective, not only in theory but also in the live demo.
Aleksandar Drašković
Azure AD B2C Webinar Series: Custom Policies Part 1Vinu Gunasekaran
Agenda:
Introducing Custom Policies in Azure AD B2C
Custom Policy Components
Relying Party and User Journeys
Claims Definitions
Technical Profiles
Getting Started with Azure AD B2C Custom Policies
This slidedeck provides a technical deep dive about Active Directory Federation Services technology for federated authentication with Office 365 and other relying parties.
Azure AD B2C Webinar Series: Custom Policies Part 2 Policy WalkthroughVinu Gunasekaran
Agenda:
Reviewing the Exercise – Collect a Loyalty Number from your Customers
Getting Started with Azure AD B2C Custom Policies
Setting up the Policy
Defining the Loyalty Number Claim
Configuring Profile Editing to Include the Loyalty Number
Configure Reading and Writing the Claim
Updating the User Journey
Relying Party Declaration Updates
T28 implementing adfs and hybrid share point Thorbjørn Værp
European SharePoint Conference 2014 in Barcelona.
Presentation Description:
In this session we look at modern forms of authentication . We’ll cover Windows Server Active Directory Federation Services (ADFS) concepts and look at federation with SharePoint. There are a number of difficulties that you’ll need to overcome implementing SAML claims with SP, for example people picker, user profile import, problematic use of some SharePoint apps. We’ll also cover the infrastructure side like making it work with host named site collections, reverse proxy servers and other user directories. Moving to the cloud we’ll look at the authentication architecture of the standards employed; like OAUTH, WS-* and OpenID Connect.
Presentation Benefit
Get a better understanding of Windows Server Active Directory Federation Services (ADFS) concepts and SAML claims connection with SharePoint.
You will learn...
Understand authentication architecture and standards employed.
ADFS concepts
How to implement SAML claims
Slide deck from Azure Saturday Munich 2019. Describing basics of online identity management and federation. But also capabilities of Azure AD B2C - from open standards protocols support (like OAuth and OpenID Connect) to building complex identity flows with Identity Experience Framework
SharePoint Evolution conference 2013 - Bringing SharePoint Information into O...Wes Hackett
Office 2013 introduces new Apps for Office which allows developers to create apps which interact with Word, Excel and Outlook. Using an App for Office we can bring information from within the enterprises SharePoint platform and help users create documents and bring increased value form their SharePoint data. The session will explore some scenarios to bring SharePoint into the Office clients.
SharePoint 2013 provides a flexible platform and introduces the concept of SharePoint modern development. In addition to the conventional development methods, we will explore the SharePoint development tools that are part of Visual Studio 2012/2013. You will see the first class support for common app features including the app pages, lists, client parts, and more. Come learn how to develop apps using an Office 365 Developer Site, all without SharePoint installed on your developer machine!
A Deep-Dive into Real-World SharePoint App DevelopmentSPC Adriatics
A Deep-Dive into Weal-world SharePoint App Development, presentation by Eric Shupps
Agenda:Build to Suit
Make the Network Work for You
The Database is King
Keep Traffic Moving
Cache In
Look Good but Perform Better
Share point app architecture for the cloud and on premiseSonja Madsen
Gain insight into potential behind new app architecture that brings server-side functionality to the cloud,
keeps your SharePoint server clean from custom code, and can serve as a bridge between on-premise and cloud environments.
Building a Windows Store App for SharePoint 2013Aspenware
Combine the fast, fluid and immersive experience of Windows Store apps with SharePoint 2013 to discover, organize and manage content. This session will walk through planning and building an app to interact with SharePoint content by utilizing the new APIs available with SharePoint 2013.
SharePoint App Store - itunes for you businessAndrew Woodward
The SharePoint App Store and how business should consider how the impact of this within their organisation.
This is a non technical presentation and will also be available as a web cast from the SPSEMEA Online Event in Jan 2011
From Trashy to Classy: How The SharePoint 2013 App Model Changes EverythingAndrew Clark
Everybody wants an app or at least they think so, SharePoint 2013 provides an Application Model to handle all your 'appy' desires. Are your current SharePoint 2007 or 2010 solutions considered truly 'self-contained'? Probably not. In this session we will discuss the short comings of older solutions, briefly review the different App Model options and finally walk through the architecture of an existing SharePoint 2013 application. We will help you ignore the hype and spend time understanding the benefits of the App Model as it is crucial for your 2013 strategy.
Road to the Cloud - Extending your reach with SharePoint and Office 365Talbott Crowell
Presentation on SharePoint and Office 365 development for ISV's at Microsoft Cambridge on March 6th, 2014. More details https://info.windowsazure.com/Feb2014BostonRoadtotheCloudBusinessstrategyandnetworkingforISVs_Register.html?LeadSource=Email&browserLanguage=&LeadSourceDetail=Person-to-person
O365 DEVCamp Los Angeles June 16, 2015 Module 06 Hook into SharePoint APIs wi...Ivan Sanders
Overview
The lab instructs students in configuring and running an Android app which allows the user to edit items in a SharePoint Task list.
Objectives
- Learn how to authenticate with Azure AD from Android using the **Azure Active Directory Authentication Library (ADAL) for Android**
- Learn how to consume SharePoint APIs from Android using the **Office 365 SDK for Android**
- Implement a new feature in the Android app
Identity and Access (AD), Azure and Office 365: Building a Single Page Application (SPA) with ASP.NET Web API and Angular.js using Azure Active Directory to Log in Users
This is a supplementary slide deck to the presentation on how to build native Android app which integrates with SharePoint Online by using Xamarin and Visual Studio. Check out sharemuch.com for the source code
From Event Receivers to SharePoint Webhooks (SPS Lisbon 2017)André Vala
With SharePoint Online, Microsoft came up with Remote Event Receivers, a way to support the same use cases but keeping the code outside of SharePoint. Recently, Microsoft decided to embrace industry standards and added support for webhooks in SharePoint.
Community call: Develop multi tenant apps with the Microsoft identity platformMicrosoft 365 Developer
Building an application that can be provisioned and used in multiple Azure AD tenants goes far beyond just flipping a switch in your app configuration. The developer has to undertake application provisioning, decide on a provisioning strategy, push changes to customers, manage identities flowing from multiple tenants, collect essential information from authentication signals, learn to differentiate the different types of users they will encounter and understand the key differences from the B2B scenarios. In this community call, Kalyan Krishnan reviews the steps and considerations required to develop, configure, provision, and manage multi-tenant applications.
For more information, visit https://aka.ms/identityplatform
The primary object in the ASP programming model is the ScriptingContext object, which exposes the interaction of the client browser. Because the ScriptingContext object is always available to ASP applications, you don't need to explicitly create a reference to it. The ScriptingContext object contains the six primary ASP objects, five built-in objects, and the ObjectContext object. The five built-in objects are the Application object, the Request object, the Server object, the Sessions object, and the Response object.
Building serverless applications with Microsoft Graph and Azure FunctionsDragan Panjkov
Presented at Advanced Technology Days 14, Zagreb, Croatia - Microsoft Graph binding extension for Azure Functions enable input and output to Graph entities and makes it quite easy to access data in Microsoft cloud from Azure Functions code. The aim of this session is to drill down into available bindings and provided function templates for Microsoft Graph and demonstrate how they can be used to build Graph-enabled serverless applications. We will also discuss implementation of common Microsoft Graph data access patterns (webhooks, batch, working with custom data) with Azure Functions.
Amazon API Gateway and AWS Lambda: Better TogetherDanilo Poccia
Amazon API Gateway is a fully managed service that makes it easy for developers to create, publish, maintain, monitor, and secure APIs at any scale. AWS Lambda is a compute service that runs your code in response to events and automatically manages the compute resources for you, making it easy to build applications that respond quickly to new information. Together they help you build a server-less event-driven backend that is easy to manage and scale.
Managing user credentials and application access is becoming more-and-more difficult in today's "cloud era". Windows Azure Pack just installed, how to let your tenants authenticate ? With their own ADFS ? With Windows Azure Active Directory ? And why not their Google account ? This session will cover all the different ways that are available today to let your user authenticate with Windows Azure Pack.
Introduction to the SharePoint Client Object Model and REST APIRob Windsor
As Microsoft was releasing SharePoint 2013 it was pretty clear that they were steering people away from using the product as a portal to using it as a gateway to external systems and services. Since the Server Object Model cannot be used remotely, developers building these external systems will need to become familiar with the Client Object Model (CSOM) and/or the REST API if they want to communicate with SharePoint. This session will introduce these two APIs, give a brief overview of their history, and then show you how to get started using them through a series of demonstrations.
Building and deploying microservices with event sourcing, CQRS and Docker (Me...Chris Richardson
In this talk we share our experiences developing and deploying a microservices-based application. You will learn about the distributed data management challenges that arise in a microservices architecture. We will describe how we solved them using event sourcing to reliably publish events that drive eventually consistent workflows and pdate CQRS-based views. You will also learn how we build and deploy the application using a Jenkins-based deployment pipeline that creates Docker images that run on Amazon EC2.
Intro slides of the Belgium edition of the Global Office 365 Developer bootcamp by Elio Struyf, Thomas Vochten, Rick Van Roussel, Yannick Borghmans, An Lenders
Let's dive deeper into the world of ODC! Ricardo Alves (OutSystems) will join us to tell all about the new Data Fabric. After that, Sezen de Bruijn (OutSystems) will get into the details on how to best design a sturdy architecture within ODC.
"Impact of front-end architecture on development cost", Viktor TurskyiFwdays
I have heard many times that architecture is not important for the front-end. Also, many times I have seen how developers implement features on the front-end just following the standard rules for a framework and think that this is enough to successfully launch the project, and then the project fails. How to prevent this and what approach to choose? I have launched dozens of complex projects and during the talk we will analyze which approaches have worked for me and which have not.
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
Keynote at DIGIT West Expo, Glasgow on 29 May 2024.
Cheryl Hung, ochery.com
Sr Director, Infrastructure Ecosystem, Arm.
The key trends across hardware, cloud and open-source; exploring how these areas are likely to mature and develop over the short and long-term, and then considering how organisations can position themselves to adapt and thrive.
PHP Frameworks: I want to break free (IPC Berlin 2024)Ralf Eggert
In this presentation, we examine the challenges and limitations of relying too heavily on PHP frameworks in web development. We discuss the history of PHP and its frameworks to understand how this dependence has evolved. The focus will be on providing concrete tips and strategies to reduce reliance on these frameworks, based on real-world examples and practical considerations. The goal is to equip developers with the skills and knowledge to create more flexible and future-proof web applications. We'll explore the importance of maintaining autonomy in a rapidly changing tech landscape and how to make informed decisions in PHP development.
This talk is aimed at encouraging a more independent approach to using PHP frameworks, moving towards a more flexible and future-proof approach to PHP development.
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Jeffrey Haguewood
Sidekick Solutions uses Bonterra Impact Management (fka Social Solutions Apricot) and automation solutions to integrate data for business workflows.
We believe integration and automation are essential to user experience and the promise of efficient work through technology. Automation is the critical ingredient to realizing that full vision. We develop integration products and services for Bonterra Case Management software to support the deployment of automations for a variety of use cases.
This video focuses on the notifications, alerts, and approval requests using Slack for Bonterra Impact Management. The solutions covered in this webinar can also be deployed for Microsoft Teams.
Interested in deploying notification automations for Bonterra Impact Management? Contact us at sales@sidekicksolutionsllc.com to discuss next steps.
Connector Corner: Automate dynamic content and events by pushing a buttonDianaGray10
Here is something new! In our next Connector Corner webinar, we will demonstrate how you can use a single workflow to:
Create a campaign using Mailchimp with merge tags/fields
Send an interactive Slack channel message (using buttons)
Have the message received by managers and peers along with a test email for review
But there’s more:
In a second workflow supporting the same use case, you’ll see:
Your campaign sent to target colleagues for approval
If the “Approve” button is clicked, a Jira/Zendesk ticket is created for the marketing design team
But—if the “Reject” button is pushed, colleagues will be alerted via Slack message
Join us to learn more about this new, human-in-the-loop capability, brought to you by Integration Service connectors.
And...
Speakers:
Akshay Agnihotri, Product Manager
Charlie Greenberg, Host
3. Agenda
Introducing Office 365 API
Developing apps consuming Office 365 API
Registering Office apps in Azure AD
Azure AD Authentication & Authorization
.Net Client Library
Office 365 apps vs SharePoint apps
U2U Site Provisioning
4.
5. Set of REST services:
Microsoft Exchange Online: Mail, Contacts & Calendars
Microsoft OneDrive for Business: My Files
Microsoft SharePoint Online: Sites
Microsoft Azure Active Directory: Authentication, Directory
Graph
Office 365 API
7. Directly via REST
.NET Client Library: Windows apps, ASP.NET, WPF, Xamarin…
JavaScript Client Library
Open Source SDK for iOS and Android
Choice of client and development
9. Applications using Office 365 API need to be registered in Azure
Active Directory
Done manually or from within Visual Studio
2 Types of applications can be registered:
• Web Application (Web API, MVC, Web Forms)
• Native Client (Mobile, Windows apps, Desktop App)
Azure Active Directory
10.
11.
12. Extensions and Updates:
Microsoft Office 365 API Tools (Part of
Office Developer Tools)
Nuget packages:
Office 365 apps in Visual Studio
O365 Service Desktop App/ Store App/
ASP.NET App
Xamarin Cordova
Users and Graphs Microsoft.Azure.ActiveDirectory.GraphClient Microsoft.Azure.ActiveDirectory.GraphClient.JS
Outlook Services Microsoft.Office365.OutlookServices
SharePoint
Services
Microsoft.Office365.SharePoint
Discovery Client Microsoft.Office365.Discovery
Any Service Microsoft.Office365.OAuth.Xamarin Microsoft.Office365.ClientLib.JS
13. Add Office 365 API to your project
Office 365 apps in Visual Studio
17. Your apps are registered in Azure AD
Azure Active Directory
18. Specify the service and permissions
Office 365 Exchange Online service
Access to Mail, Calendar, Contacts
Office 365 SharePoint Online service
Access to Files in SharePoint Online or OneDrive for Business
Azure Active Directory
19.
20.
21. OAuth 2.0 Authorization Code Grant flow
App uses access token on your behalf
Oauth 2.0 Client Credentials Grant Flow
App runs with own permissions
Only supported by contacts, calendar & mail
Authentication and Authorization
22. App redirects user to an AAD authentication endpoint
Authentication for Office 365 Apps
23. User authenticates and grants consent
Azure AD issues an authorization code
Authentication for Office 365 Apps
27. 1. Authenticate by using Active Directory
Authentication Library (ADAL)
2. Discover available App capabilities. Returns only
services App has access to.
3. Connect through Outlook/SharePoint Services
Client
Programming with Office 365 API
28. Get resource endpoints from discovery service
Programming with Office 365 API
End Point (i.e)
Discovery https://api.office.com/discovery/v1.0/me
Mail
Contacts
Calendar
https://{server_name}/api/{version}/{user_context}
https://outlook.office365.com/api/v1.0/me
OneDrive for
Business
https://{tenant}-my.sharepoint.com/_api/v1.0/me
Sites https://{tenant}.sharepoint.com/{site-path}/_api/v1.0
29. Discovery client from WebApp
// Get user and object ID from claims
var signInUserId = ClaimsPrincipal.Current.FindFirst(ClaimTypes.NameIdentifier).Value;
var userObjectId =
ClaimsPrincipal.Current.FindFirst("http://schemas.microsoft.com/identity/claims/objectid
entifier").Value;
// Authority: "https://login.windows.net/<tenant id>"
AuthenticationContext authContext = new AuthenticationContext(SettingsHelper.Authority,
new ADALTokenCache(signInUserId));
// Create Discovery Client
// DiscoveryServiceEndpointUri: "https://api.office.com/discovery/v1.0/me/"
// DiscoveryServiceResourceId: "https://api.office.com/discovery/"
DiscoveryClient discClient = new
DiscoveryClient(SettingsHelper.DiscoveryServiceEndpointUri,
async () =>
{
var authResult =
await authContext.AcquireTokenSilentAsync(
SettingsHelper.DiscoveryServiceResourceId,
new ClientCredential(SettingsHelper.ClientId, SettingsHelper.AppKey),
new UserIdentifier(userObjectId, UserIdentifierType.UniqueId));
return authResult.AccessToken;
});
31. Outlook Services Client
// Discover if resource is available
CapabilityDiscoveryResult dcr = await discClient.DiscoverCapabilityAsync(”Mail”);
// Get the OutlookServicesClient: this gives access to mail, contacts, calendar
return new OutlookServicesClient(dcr.ServiceEndpointUri,
async () =>
{
var authResult =
await authContext.AcquireTokenSilentAsync(
dcr.ServiceResourceId,
new ClientCredential(SettingsHelper.ClientId,
SettingsHelper.AppKey),
new UserIdentifier(userObjectId, UserIdentifierType.UniqueId));
return authResult.AccessToken;
});
32. Gives access to Mail, Calendar and Contacts
Outlook Services Client
33. Send email
// Initialize variables
string subject = "Mail sent by using Office 365 APIs";
string recipients = "lieven@u2u365.onmicrosoft.com;els@u2u365.onmicrosoft.com";
string bodyContent = "This email was created from code and was sent using the Office 365
APIs";
// Prepare list of recipients
List<Recipient> toRecipients =
recipients
.Split(new char[]{';'}, StringSplitOptions.RemoveEmptyEntries)
.Select(
recipient =>
new Recipient
{
EmailAddress = new EmailAddress { Address = recipient, Name =
recipient }
})
.ToList<Recipient>();
// Create draft message
Message draft =
new Message()
{
Subject = subject,
Body = new ItemBody { ContentType = BodyType.Text, Content = bodyContent},
ToRecipients = toRecipients
};
34. Send email
// Add the message to the draft folder. This results in a call to the service.
// Returns full item but unfortunately you dont have access to it.
await
outlookServicesClient.Me.Folders.GetById("Drafts").Messages.AddMessageAsync(draft);
// Gets the full draft message, including the identifier needed to issue a send mail
request.
// This results in a call to the service.
IMessage updatedDraft = await
outlookServicesClient.Me.Folders.GetById("Drafts").Messages.GetById(draft.Id).ExecuteAsy
nc();
// Issues a send command so that the draft mail is sent to the recipient list.
// This results in a call to the service.
await
outlookServicesClient.Me.Folders.GetById("Drafts").Messages.GetById(updatedDraft.Id).Sen
dAsync();
35. Get contacts
Add contact
Delete contact
Contacts
// Get paged collection of contacts
IPagedCollection<IContact> contactsPage =
await (outlookServicesClient.Me.Contacts.OrderBy(c => c.FileAs))
.Skip((pageNo - 1) * pageSize).Take(pageSize).ExecuteAsync();
// Create contact
Contact newContact = new Contact();
...
// This results in a call to the service.
await outlookServicesClient.Me.Contacts.AddContactAsync(newContact);
// Get the contact to delete
var contactToDelete = await outlookServicesClient.Me.Contacts[contactId].ExecuteAsync();
// Delete the contact
await contactToDelete.DeleteAsync();
36. Get events
Add event
Delete Event
Events
// Get paged collection of events
IPagedCollection<IEvent> eventsPage =
await (outlookServicesClient.Me.Calendar.Events.Where(e => e.Start >=
DateTimeOffset.Now.AddDays(-30) && e.Start <= DateTimeOffset.Now.AddDays(30))
.OrderBy(e => e.Start))
.Skip((pageNo - 1) * pageSize).Take(pageSize).ExecuteAsync();
// Create new event and add
Event newEvent = new Event();
await outlookServicesClient.Me.Events.AddEventAsync(newEvent);
// Get the event to delete
IEvent eventToDelete = await
outlookServicesClient.Me.Calendar.Events[selectedEventId].ExecuteAsync();
// Delete the event
await eventToDelete.DeleteAsync(false);
37. Gives access to Files and OneDrive
SharePoint Services Client
// Discover if resource is available
CapabilityDiscoveryResult dcr = await discClient.DiscoverCapabilityAsync(”MyFiles”);
// Get the SharePointClient: this gives access to OneDrive and Files
return new SharePointClient(dcr.ServiceEndpointUri,
async () =>
{
var authResult =
await authContext.AcquireTokenSilentAsync(
dcr.ServiceResourceId,
new ClientCredential(SettingsHelper.ClientId, SettingsHelper.AppKey),
new UserIdentifier(userObjectId, UserIdentifierType.UniqueId));
return authResult.AccessToken;
});
38. Get files
// Do paging when fetching
int pageNo = 1;
int pageSize = 25;
// Get the SharePoint client
SharePointClient sharePointClient = await
AuthenticationHelper.EnsureSharePointClientCreatedAsync("MyFiles");
// Get the files (and folders)
IPagedCollection<IItem> filesPage =
await (sharePointClient.Files.Where(i => i.Type == "File"))
.Skip((pageNo - 1) * pageSize).Take(pageSize).ExecuteAsync();
// Get current page
IReadOnlyList<IItem> fileItems = filesPage.CurrentPage;
// Cast to file objects
IEnumerable<File> files = fileItems.Cast<File>();
39. Add file
// Filename + SharePoint Client
string filename = "sample.txt";
var spClient = await AuthenticationHelper.EnsureSharePointClientCreatedAsync("MyFiles");
// Check if the file exists, delete it if it does
try
{
IItem item = await spClient.Files.GetByPathAsync(filename);
await item.DeleteAsync();
}
catch (ODataErrorException)
{
// fail silently because it doesn't exist.
}
// In this example, we'll create a simple text file and write the current timestamp into it.
string createdTime = "Created at " + DateTime.Now.ToLocalTime().ToString();
byte[] bytes = Encoding.UTF8.GetBytes(createdTime);
using (MemoryStream stream = new MemoryStream(bytes))
{
// If file already exists, we'll get an exception.
File newFile = new File { Name = filename };
// Create the empty file.
await spClient.Files.AddItemAsync(newFile);
// Upload the file contents.
await spClient.Files.GetById(newFile.Id).ToFile().UploadAsync(stream);
}
40.
41. Type of application
Office 365 apps vs SharePoint apps
Office 365 apps SharePoint apps
External/standalone app Integrated in SharePoint
42. Accessibility
Office 365 apps vs SharePoint apps
Office 365 apps SharePoint apps
From any link
From the Office 365 App Launcher From the
Office 365 “My apps” page
from a SharePoint/SharePoint Online site
43. Registration
Office 365 apps vs SharePoint apps
Office 365 apps SharePoint apps
Registration in Azure AD Registration in _layouts/15/appregnew.aspx
44. Deployment
Office 365 apps vs SharePoint apps
Office 365 apps SharePoint apps
Deployed once to the hosting platform
Mobile/Web/Desktop
*.app package deployed to app catalog and
installed in various SharePoint sites
45.
46. Accessing CSOM from Office 365 app
private static async Task<string> GetAccessToken(string resource)
{
// Redeem the authorization code from the response for an access token and refresh token.
var principal = ClaimsPrincipal.Current;
var nameIdentifier = principal.FindFirst(ClaimTypes.NameIdentifier).Value;
var tenantId = principal.FindFirst("http://schemas.microsoft.com/identity/claims/tenantid").Value;
AuthenticationContext authContext = new AuthenticationContext(
string.Format("{0}/{1}", SettingsHelper.AuthorizationUri, tenantId),
new ADALTokenCache(nameIdentifier));
var objectId =
principal.FindFirst("http://schemas.microsoft.com/identity/claims/objectidentifier").Value;
var result = await authContext.AcquireTokenSilentAsync(
resource,
new ClientCredential(SettingsHelper.ClientId, SettingsHelper.AppKey),
new UserIdentifier(objectId, UserIdentifierType.UniqueId)
);
return result.AccessToken;
}
SharePoint url
47. Set Authorization header for every request
Start accessing lists, items, …
Permissions are checked
Accessing CSOM from Office 365 app
ClientContext clientContext = new ClientContext(spSiteUrl);
clientContext.ExecutingWebRequest +=
(sender, e) =>
{
e.WebRequestExecutor.WebRequest.Headers["Authorization"] =
"Bearer " + accessToken;
};
Your app gets the user's email address. It contacts Discovery Service with email address and the set of scopes the app wants to access.
The app goes to the Azure AD authorization endpoint and the user authenticates and grants consent (if consent has not been granted before). Azure AD issues an authorization code.
Your app redeems the authorization code. Azure returns an access token and a refresh token.
Your app can now call Office 365 APIs using the URI from Discovery Service and the access token. Office 365 returns Http Response.