This file contains hidden or 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
POST https://platinumdogsconsulting.sharepoint.com/teams/PKC_EDMS_Discovery/_vti_bin/client.svc/ProcessQuery | |
Content-Type: text/xml | |
X-RequestDigest: | |
User-Agent: | |
Host: | |
<Request AddExpandoFieldTypeSuffix="true" ApplicationName=".NET Library" LibraryVersion="16.0.0.0" SchemaVersion="15.0.0.0" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"> | |
<Actions> | |
<ObjectPath Id="48" ObjectPathId="47"/> | |
<ObjectIdentityQuery Id="49" ObjectPathId="47"/> |
This file contains hidden or 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
(async function() { | |
function getFailedResponseData(response) { | |
return new Promise( async (resolve) => { | |
const ct = response.headers.get("Content-Type") || ""; | |
let data = {}; | |
if (ct.match("application/json")) { | |
data = await response.json(); | |
} else { |
This file contains hidden or 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
POST https://platinumdogsconsulting.sharepoint.com/sites/hubsitetest/_api/site/GetCopyJobProgress | |
HEADERS | |
{ | |
Accept: application/json;odata=verbose | |
Content-Type: application/json;odata=verbose | |
X-RequestDigest: <<site form digest>> | |
} | |
BODY | |
{ | |
"copyJobInfo": { |
This file contains hidden or 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
(async function() { | |
function getAccessToken(resource) { | |
return new Promise( async (resolve, reject) => { | |
var body = { | |
"resource": resource || "https://graph.microsoft.com" | |
}; | |
const url = `${_spPageContextInfo.webAbsoluteUrl}/_api/SP.OAuth.Token/Acquire`; | |
const response = await fetch(url, { |
This file contains hidden or 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
param ( | |
[string]$tenantId, | |
[string]$userName, | |
[string]$userPassword, | |
[string]$subscriptionId, | |
[switch]$production, | |
[switch]$quiet | |
) | |
## Connecting to site | |
Clear-Host |
This file contains hidden or 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
POST /{tenant id}/oauth2/token HTTP/1.1 | |
Host: login.microsoftonline.com | |
Content-Type: application/x-www-form-urlencoded | |
cache-control: no-cache | |
client_id:{client id} | |
client_secret:{client secret} | |
grant_type:urn:ietf:params:oauth:grant-type:jwt-bearer | |
assertion:{access_token_value} | |
resource:https://graph.microsoft.com/ |
This file contains hidden or 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
POST /{tenant id}/oauth2/token HTTP/1.1 | |
Host: login.microsoftonline.com | |
Content-Type: application/x-www-form-urlencoded | |
cache-control: no-cache | |
client_id:{client id} | |
client_secret:{client secret} | |
grant_type:refresh_token | |
refresh_token:{refresh_token_value} | |
resource:https://graph.microsoft.com/ |