samesite cookie update in Azure Web App

Copper Contributor

I had a working solution where I was calling the Azure web app API as per the below code.

private getResult(deferred: any, url: string): any {
            SP.SOD.executeOrDelayUntilEventNotified(token => {
                this.$http.get(url, { headers: { "Authorization": `Bearer ${token}`} })
                    .then(result => {
                        var data = JSON.parse(result.data["value"]);
                        deferred.resolve(data);
                    }, error => { deferred.reject(error); });
            }, Constants.Events.BackendLogin);
        }

Due to update in browsers for the SameSite by default cookies, my solution has stopped working.

 
 
 
 

sameSite.png

 

SP.SOD.executeOrDelayUntilEventNotified(token => {

}

This piece of code used to return the token which was being used in the headers while calling the http.get API call.

Now after this same site cookie update the SP.SOD.executeOrDelayUntilEventNotified is not firing and we are not able to get the token.

Do I need to change the code from my end to get the token or is there any configuration change required in the Azure web app?

0 Replies