Use impersonation in SPFX Webpart

%3CLINGO-SUB%20id%3D%22lingo-sub-837055%22%20slang%3D%22en-US%22%3EUse%20impersonation%20in%20SPFX%20Webpart%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-837055%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20sharepoint%20team%20site%20with%20a%20list%20that%20have%20custom%20permissions.%3C%2FP%3E%3CP%3EI%20want%20to%20develop%20a%20WebPart%20SPFx%20that%20shows%20list%20items%20from%20my%20list%20for%20user%20who%20didn't%20have%20permissions.%3C%2FP%3E%3CP%3EI%20saw%20that%20we%20can%20create%20secured%20AAD%20function%20that%20let%20impersonation.%3C%2FP%3E%3CP%3ECould%20you%20explain%20process%20please%20%3F%20How%20it%20does%20works%20%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-837055%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzureFunction%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EImpersonation%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESPFx%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-837115%22%20slang%3D%22en-US%22%3ERe%3A%20Use%20impersonation%20in%20SPFX%20Webpart%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-837115%22%20slang%3D%22en-US%22%3EWhat%20you%20can%20create%20is%20an%20Azure%20Function%20and%20then%20secure%20it%20through%20Azure%20AD.%20In%20this%20Azure%20Function%20you%20have%20to%20write%20the%20code%20to%20return%20all%20the%20list%20items%20using%20OAuth%20behind%20the%20scenes%20(ClientID%2C%20ClientSecret%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-838043%22%20slang%3D%22en-US%22%3ERe%3A%20Use%20impersonation%20in%20SPFX%20Webpart%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-838043%22%20slang%3D%22en-US%22%3E%3CP%3EThank%20you%20for%20your%20response.%3C%2FP%3E%3CP%3EWhat%20are%20the%20permissions%20applied%20on%20Azure%20Function%20%3F%3C%2FP%3E%3CP%3EDo%20you%20have%20an%20example%20%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

Hi,

 

I have sharepoint team site with a list that have custom permissions.

I want to develop a WebPart SPFx that shows list items from my list for user who didn't have permissions.

I saw that we can create secured AAD function that let impersonation.

Could you explain process please ? How it does works ?

 

Thank you.

2 Replies
Highlighted
What you can create is an Azure Function and then secure it through Azure AD. In this Azure Function you have to write the code to return all the list items using OAuth behind the scenes (ClientID, ClientSecret
Highlighted

Thank you for your response.

What are the permissions applied on Azure Function ?

Do you have an example ?