// v1.x
$response = $graphClient->createRequest('GET', '/users/userId/messages')
->setReturnType(Model\User::class)
->execute();
// v2.0-RC
$response = $graphServiceClient->usersById('userId')->messages()->get()->wait();
// v1.x
$accessToken = getAccessToken(); // custom token retrieval method
$graph = new Graph();
$graph->setAccessToken($accessToken);
$graph ->createRequest('GET', '/me')
->setAccessToken(getAccessToken()) //after initial token expires
...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Sample for .NET | |
var graphClient = new GraphServiceClient(credential, scopes); | |
var result = await graphClient.Me.Drive.GetAsync(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Connecting to your tenant | |
Connect-PnPOnline -Url https://tenant.sharepoint.com | |
# Getting the list of pages utilizing the Learning Pathways web part | |
Submit-PnPSearchQuery -Query "FileExtension:aspx 141d4ab7-b6ca-4bf4-ac59-25b7bf93642d" -All -RelevantResults | Select-Object OriginalPath |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Connecting to your tenant | |
Connect-PnPOnline -Url https://tenant.microsoft.com | |
# Creating the Modern Site | |
New-PnPTenantSite ` | |
-Title "Modern Site" ` | |
-Url "https://tenant.sharepoint.com/sites/modern-site" ` | |
-Description "Modern Site" ` | |
-Owner "admin@tenant.onmicrosoft.com" ` | |
-Lcid 1033 ` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { AngularMaterial } from './angular-material'; | |
import { NgModule } from '@angular/core'; | |
import { MatToolbarModule } from '@angular/material'; | |
import { BrowserModule } from '@angular/platform-browser'; | |
import { CommonModule } from '@angular/common'; | |
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; | |
import { Environment, EnvironmentType } from '@microsoft/sp-core-library'; | |
/** | |
* Module that intializes our Angular Element |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, Input, ViewEncapsulation } from '@angular/core'; | |
@Component({ | |
selector: 'angular-material', | |
templateUrl: 'angular-material.html', | |
styleUrls: [ 'angular-material.scss' ], | |
encapsulation: ViewEncapsulation.None | |
}) | |
export class AngularMaterial { | |
@Input() public name: string; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* fallback */ | |
@font-face { | |
font-family: 'Material Icons'; | |
font-style: normal; | |
font-weight: 400; | |
src: local('Material Icons'), local('MaterialIcons-Regular'), url(https://fonts.gstatic.com/s/materialicons/v17/2fcrYFNaTjcS6g4U3t-Y5ZjZjT5FdEJ140U2DJYC3mY.woff2) format('woff2'); | |
} | |
.material-icons { | |
font-family: 'Material Icons'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="example-container mat-elevation-z8"> | |
<mat-toolbar color="primary"> | |
<mat-toolbar-row> | |
<span>{{ name }}</span> | |
</mat-toolbar-row> | |
</mat-toolbar> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "spfx-ng-webparts", | |
"version": "0.0.1", | |
"private": true, | |
"engines": { | |
"node": ">=0.10.0" | |
}, | |
"scripts": { | |
"build": "gulp bundle", | |
"clean": "gulp clean", |
NewerOlder