SOLVED

SPFX Webpart (react JS) not visible to users with read permission on the site

%3CLINGO-SUB%20id%3D%22lingo-sub-758268%22%20slang%3D%22en-US%22%3ESPFX%20Webpart%20(react%20JS)%20not%20visible%20to%20users%20with%20read%20permission%20on%20the%20site%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-758268%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20created%20a%20SPFX%20webpart%20using%20React.JS%2C%20it's%20working%20fine%20but%20users%20with%20read%20permissions%20on%20the%20site%20are%20not%20able%20to%20view%20the%20webpart%20on%20the%20page.%3C%2FP%3E%3CP%3EAs%20soon%20as%20I%20change%20the%20user%20permission%20from%20read%20to%20edit%20or%20higher%20permission%20then%20its%20visible%20to%20the%20user.%3C%2FP%3E%3CP%3EThe%20page%20is%20published.%3C%2FP%3E%3CP%3EAny%20suggestion%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-758268%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPnP%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-758418%22%20slang%3D%22en-US%22%3ERe%3A%20SPFX%20Webpart%20(react%20JS)%20not%20visible%20to%20users%20with%20read%20permission%20on%20the%20site%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-758418%22%20slang%3D%22en-US%22%3E%3CP%3ETo%20me%20this%20sounds%20like%20you%20have%20some%20logic%20in%20your%20WebPart%20that%20requires%20the%20user%20to%20have%20more%20than%20Read-only%20permissions.%20This%20probably%20results%20in%20an%20exception%20ultimately%20causing%20the%20WebPart%20not%20being%20rendered.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-759722%22%20slang%3D%22en-US%22%3ERe%3A%20SPFX%20Webpart%20(react%20JS)%20not%20visible%20to%20users%20with%20read%20permission%20on%20the%20site%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-759722%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1803%22%20target%3D%22_blank%22%3E%40Paul%20Pascha%3C%2FA%3E%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYes%2C%20you%20are%20correct.%20I%20am%20fetching%20the%20list%20of%20sub%20sites%20and%20then%20looking%20for%20a%20specific%20sub%20site%20and%20then%20in%20the%20sub%20sites%20querying%20the%20site%20pages.%26nbsp%3B%3C%2FP%3E%3CP%3EI%20think%20this%20is%20the%20issue.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20helping%20me%20out.%26nbsp%3B%3C%2FP%3E%3CP%3ECheers%20%3A)%3C%2Fimg%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Contributor

Hi,

 

I have created a SPFX webpart using React.JS, it's working fine but users with read permissions on the site are not able to view the webpart on the page.

As soon as I change the user permission from read to edit or higher permission then its visible to the user.

The page is published.

Any suggestion

 

2 Replies
Highlighted
Best Response confirmed by Tarundeep Singh (Occasional Contributor)
Solution

To me this sounds like you have some logic in your WebPart that requires the user to have more than Read-only permissions. This probably results in an exception ultimately causing the WebPart not being rendered.

Highlighted

Hi @Paul Pascha,

 

Yes, you are correct. I am fetching the list of sub sites and then looking for a specific sub site and then in the sub sites querying the site pages. 

I think this is the issue.

 

Thanks for helping me out. 

Cheers :)