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
const push = async (file, fileName) => { | |
const client = new aws.SecretsManager(); | |
const spURL = `https://<your site>.sharepoint.com/sites/<your specific subsite>/_api/web/GetFolderByServerRelativeUrl('Documents')/Files/Add(url='${fileName}', overwrite=true)`; | |
try { | |
const data = await client.getSecretValue({ SecretId: '<whatever you called your secret>' }).promise(); | |
const secret = JSON.parse(data.SecretString).<whatever you called your secret>; | |
const getToken = await axios.post('https://accounts.accesscontrol.windows.net/<sharepoint resource id>/tokens/OAuth/2', | |
querystring.stringify({ | |
grant_type: 'client_credentials', | |
client_id: '<ask your sharepoint person for this it's a something@tenant id>', |
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
{ | |
"properties": { | |
"mode": "all", | |
"parameters": { | |
}, | |
"displayName": "SSL WebSites", | |
"description": "This policy enables you to restrict websites to only accept TLS traffic with minimum version 1.2", | |
"policyRule": { | |
"if": { | |
"anyOf": [ |