-
Hello, Independent of the location (tried two), I keep getting the following error. System.Text.Json.JsonException at Consumer.Program.(String[] args) This exception was originally thrown at this call stack: Inner Exception 1: I don't know if this is something with the site, or my code. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 12 replies
-
I was wondering if there was a way to see what "using (var context = await pnpContextFactory.CreateAsync("DemoSite"))" line of code (where the failure occurs) is receiving as a webpage. It looking for JSON, but may be getting a webpage. All info line in the command window form the example indicate code 200, which should be good. I had permssions errors (404 and 403), and those were resolved. I jsut can't find what is receiving, or is there a way to change the format of the content that it should receive? |
Beta Was this translation helpful? Give feedback.
@faurepa : having the SharePoint AllSites.Read and Graph Sites.Read.All should be sufficient. Looking at the error I see "Policies/Forms/AllItems.aspx" in the URL. This makes me think you've specified the site collection wrongly. In your case the site collection to use would be https://honeywellprod.sharepoint.com/teams/GlobalPolicyManual. Can you cross check that?