Forum Discussion
vcima
Mar 16, 2020Brass Contributor
How can I get the user token from the context in a Sharepoint WebPart?
I have been working in a Sharepoint Webpart with TypeScript. I would like to obtain the user token to pass it as a parameter in the headers. How can I do this?. So far, I have something like this:...
Sudharsan K
Mar 17, 2020Iron Contributor
Hi,
I suggest you try to use PnP JS for SharePoint communication. It will take care of all the authentication and authorization part so that we can focus on the functionality. Please refer the below link for more info.
https://pnp.github.io/pnpjs/getting-started/
I suggest you try to use PnP JS for SharePoint communication. It will take care of all the authentication and authorization part so that we can focus on the functionality. Please refer the below link for more info.
https://pnp.github.io/pnpjs/getting-started/