We can make this file beautiful and searchable if this error is corrected: It looks like row 8 should actually have 11 columns, instead of 10. in line 7.
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
Firstname,Lastname,StreetAddress,City,PostalCode,Country,Password,Department,Office,UserPrincipalName,DisplayName | |
Alan,Partridge,1443 Bloomfield Way,London,EN5 1AD,UK,aaiQu9soogae,Sales,Barnet,Alan.Partridge@REPLACEWITHTENANTDOMAIN.onmicrosoft.com,Alan Partridge | |
Bella,Barlow,103 Hedge Street,London,EN5 1AD,UK,S111olaek9,Marketing,Barnet,Bella.Barlow@REPLACEWITHTENANTDOMAIN.onmicrosoft.com,Bella Barlow | |
Keith,Clarke,1342 Freshour Circle,London,EN5 1AD,UK,di6h2oYai,Finance,Barnet,Keith.Clarke@REPLACEWITHTENANTDOMAIN.onmicrosoft.com,Keith Clarke | |
Tilly,Brie,1724 Burke Street,London,EN5 1AD,UK,abh7aiVbi,IT,Barnet,Tilly.Brie@REPLACEWITHTENANTDOMAIN.onmicrosoft.com,Tilly Brie | |
Tim,Apple,1680 Fannie Street,London,EN5 1AD,UK,ux4OopaeKo7,IT,Barnet,Tim.Gray@REPLACEWITHTENANTDOMAIN.onmicrosoft.com,Tim Gray | |
Mark,Davis,3583 Woodland Terrace,London,EN5 1AD,UK,abcikeiloh7,IT,Barnet,Mark.Davis@REPLACEWITHTENANTDOMAIN.onmicrosoft.com,Mark Davis | |
Ralph,Goodlow,2639 Orphan Road,London,EN5 1AD,UK,9d!p3ohhu,Finance,Barnet,Ralph.Goodl |
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
#Install-Module MSOnline | |
$users = ipcsv ./CreateDemoUsers.csv; | |
Connect-MsolService | |
$users | ForEach-Object { | |
Write-Host "Adding $($_.DisplayName)..." -foregroundcolor green; | |
$user = $_.psobject.properties | % { $ht = @{} } { $ht[$_.Name] = $_.Value } { $ht }; |
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 utils from './utils'; | |
// First we need to make sure we are backwards compatible with IE (no ArrayBuffer.slice) | |
if (!ArrayBuffer.prototype.slice) { | |
ArrayBuffer.prototype.slice = function (begin, end) { | |
let len = this.byteLength; | |
begin = (begin|0) || 0; | |
end = end === (void 0) ? len : (end|0); | |
// Handle negative values. |
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 * as React from 'react'; | |
import * as ReactDom from 'react-dom'; | |
import { Version } from '@microsoft/sp-core-library'; | |
import { | |
BaseClientSideWebPart, | |
IPropertyPaneConfiguration, | |
WebPartContext | |
} from '@microsoft/sp-webpart-base'; | |
import * as strings from 'MyWebPartStrings'; | |
import MyComponent from './components/MyComponent'; |
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
var ctx = SP.ClientContext.get_current(); | |
this.user = ctx.get_web().get_currentUser(); | |
this.alerts = this.user.get_alerts(); | |
ctx.load(this.user); | |
ctx.load(this.alerts); | |
ctx.executeQueryAsync(()=> { | |
var enumerator = this.alerts.getEnumerator(); |
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
//the final REST call is made to get the file information after it has been fully uploaded (especially the file list item id) | |
function getFileInformation(libraryPath, fileName, resolve, reject) { | |
let endpoint = String.format("{0}/_api/sp.appcontextsite(@target)/web/getfilebyserverrelativeurl(@libraryPath)/ListItemAllFields?@target='{3}'&@libraryPath='/sites/assetdatabase/{1}/{2}'", | |
utils.getSpContaxtUrlParams().appWebUrl, libraryPath, fileName, utils.getSpContaxtUrlParams().hostWebUrl); | |
const headers = { | |
"Accept": "application/json; odata=verbose" | |
}; |
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
//Helper method - depending on what chunk of data we are dealing with, we need to use the correct REST method... | |
function getUploadMethod(offset, length, total) { | |
if (offset + length + 1 > total) { | |
return 'finishupload'; | |
} else if (offset === 0) { | |
return 'startupload'; | |
} else if (offset < total) { | |
return 'continueupload'; | |
} |
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
function getDocumentQueryStrings() { | |
const sections = document.URL.split('?'); | |
return sections.length > 1 ? sections[1].split('&') : []; | |
} | |
function S4() { | |
return (((1 + Math.random())*0x10000)|0).toString(16).substring(1); | |
} |
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
//this method sends the REST request using the SP RequestExecutor.js | |
function executeAsync(endPointUrl, data, requestHeaders) { | |
return new Promise((resolve, reject) => { | |
// remember that utils script we created? | |
let executor = new SP.RequestExecutor(utils.getSpContaxtUrlParams().appWebUrl); | |
// Send the request. | |
executor.executeAsync({ | |
url: endPointUrl, | |
method: "POST", |