sp-dev-fx-webparts/samples/react-site-secure-function-call
2024-07-13 10:03:58 +02:00
..
2024-07-13 10:03:58 +02:00
2024-07-13 10:03:58 +02:00
2024-07-13 10:03:58 +02:00

react-site-secure-function-call

Summary

This combined SharpPoint Framework and Azure Function solution is to provide the potentially most secure access from SharePoint Famework to any kind of third party API, in fact here Microsoft Graph. It shows that AadHttpClient should be preferred over MSGraphClient.

Update site descreption
Update site descreption

For further details see the author's blog post

Used SharePoint Framework Version

version

Applies to

Version history

Version Date Author Comments
1.0 July 12, 2024 Markus Moeller Initial release

Disclaimer

THIS CODE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.


Minimal Path to Awesome

  • Clone this repository
    git clone https://github.com/pnp/sp-dev-fx-webparts.git
    
  • You will need to register an app in Entra ID
    • with client secret
    • with delegated Graph permission Sites.FullControl.All
    • With exposed Api "access_as_user" and App ID Uri api://[Your-Desired-Func-Url]/[Your-ClienID]
  • Azure Function:
    • Rename local.sample.settings.json to local.settings.json and fill out tenantId, clientId, clientSecret and domain [Your-Desired-Func-Url]
    • Run F5
  • SPFx web part
    • Move to wep part folder
    cd samples\react-site-secure-function-call
    
    • Rename azFunct.sample.json to azFunct.json and fill out appIdUri api://[Your-Desired-Func-Url]/[Your-ClienID]
    • Ensure that you are at the solution folder
    • in the command-line run:
      • npm install
      • gulp serve

Include any additional steps as needed.

Features

Description of the extension that expands upon high-level summary above.

This extension illustrates the following concepts:

References