Find file History
Latest commit 913e37c Jul 8, 2017
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
assets Cleaning repo Jun 12, 2017
config Cleaning repo Jun 12, 2017
src/extensions/graphAppCustom Finetuning sample Jun 19, 2017
.editorconfig Cleaning repo Jun 12, 2017
.gitattributes Cleaning repo Jun 12, 2017
.gitignore Cleaning repo Jun 12, 2017
.npmignore Cleaning repo Jun 12, 2017
.yo-rc.json Cleaning repo Jun 12, 2017
README.md Fixed Headline Jul 8, 2017
gulpfile.js Cleaning repo Jun 12, 2017
package-lock.json Cleaning repo Jun 12, 2017
package.json Cleaning repo Jun 12, 2017
tsconfig.json Cleaning repo Jun 12, 2017

README.md

Application Customizer GraphClient from Modern Teamsite

Summary

Based on this example: https://dev.office.com/sharepoint/docs/spfx/extensions/get-started/using-page-placeholder-with-extensions

And some code inspiration from Mikael Svenson (@mikaelsvenson) http://www.techmikael.com/2017/06/accessing-microsoft-graph-resources.html

Simple example to call the Graph via the new GraphHttpClient (No ADAL) for getting the group title, mail, and description.

Notice, this assumes that you are using a "modern" collaboration site (group site) for testing.

Screenshot with custom header

Used SharePoint Framework Version

1.1

Applies to

Solution

Solution Author(s)
graph-app-customizer Simon Ågren (dizparc AB.(https://github.com/simonagren))

Version history

Version Date Comments
1.0 June 9, 2017 Initial release

Disclaimer

THIS CODE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.

Steps for testing

  1. You need a developer tenant https://dev.office.com/devprogram
  2. Create a modern teamsite/group via the SharePoint startpage.
  3. Navigate to a document library on the site.
  4. In the project's manifest.json, copy the id and paste into the step 5 querystring
  5. Add the following querystring:
?loadSPFX=true&debugManifestsFile=https://localhost:4321/temp/manifests.js&customActions={"<Your application ID>":{"location":"ClientSideExtension.ApplicationCustomizer"}}

Debug URL for testing

Here's a debug URL for testing around this sample.

?loadSPFX=true&debugManifestsFile=https://localhost:4321/temp/manifests.js&customActions={"6ed4a222-c0c8-441e-ae2e-d2240084deff":{"location":"ClientSideExtension.ApplicationCustomizer"}}

Building the code

git clone the repo
move to right folder
npm i
npm i -g gulp
gulp