Skip to content

abcguzowski/SPO-AWS-AAD

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This code is a part of post about how to make connection from Sharepoint Online to Azure Web Service authenticated with Azure Active Directory. Please read it in order to get the context of this code.

Preparation

To test this code you need to have:
  • Access to Sharepoint Online
    However any kind of server that can host HTML+JS code will work Please remember that to properly reproduce behaviour described in mentioned blog post it should be on different domain than web service.
  • Azure subscription
    Required for hosting web service. It should also have active directory for providing desired authentication config.

Projects

Solution consists of 2 projects:
  • Web Service
    it's simple ASP.NET WEB API that you deploy on Azure
  • Sharepoint App (Add-On)
    Sharepoint App that you can deploy on SPO in order to test client <-> web service communication. If you want you can just install app as a sandbox solution (I write about it in this post in section: "Create Sharepoint Add-in"). Alternatively you can also just take files from solution and upload it manually (remember to change reference paths inside files).

Deployment

To properly deploy solution you need to:
  • In ClientPart/Scripts/ClientPart.js file:
    • In CORS section: provide you web service name (part of it's url)
    • In Auth section: provide tenant name and clientId in windows.config object
  • In WebService/Controllers/ValuesController file:
    • In CORS attribute: provide name of your SP tenant
  • In WebService/Controllers/ProvisionController file:
    • Provide url to your ClientPart.aspx file (just for return redirection purposes)
Publish web service, publish client part solution and be aware of configurating CORS and authentication as described in related post.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published