Showing posts from 2020

Sharepoint Online SPFx Search Rest Api 403

In case you develop an SPFx and you try to use RestApi for Search (or maybe also with the SP Rest) and you get 403, this in because your Webpart is running in his own scope, under an IFRAME.

The solution is to dynamically take your Absolute Url letfilesQuery = this.context.pageContext.web.absoluteUrl;
Every SPFx Webpart has his own SPPageContextInfo.
P.S. In case you choose to user SPHttpClient, you need 2 things to get over your 500 error: 1. use Default configuration (that should be v3 or v4) 2. change Accept header odata part to verbose
this.context.spHttpClient.get(filesQuery, newSPHttpClientConfiguration({}),       { headers: { Accept:"application/json;odata=verbose;charset=utf-8" } })         .then((response: SPHttpClientResponse) => {   response.json().then((responseJSON: any) => {   console.log(responseJSON);  //your code ...         });         }); 

Windows 10 Microphone not working

Start -> Settings -> Sound
under "Input" find "Manage sound devices" link
under "Input devices", click the devices and enable them

How to get RSS feed to Sharepoint List with Flow Automation

3 simple steps - Recurrence,  RSS, Apply to each with some Composes

1 - Recurrence
Just state the recurrence of querying the feed

2 - Use the RSS connector, which actually just get the JSON array of the items :)
(at least in my case)

3 - Apply to each with some Composes

What can't be seen in the image is the formula, for each composite the formula is the same appart from the json field value, here "publishDate", place that in the "Expression" side of the "add dynamic content" and click "OK"

items('Apply to each')?['publishDate']
which apparently can be also be done with

item()?['User ID 1']

And create the SP item

In order have distinct value items I set the SP list Title columns to force distinct values, it then shows an error for each attempt to create duplicate value