REST API - Search - Issues

So, upon submitting this post last week, I was getting 401s while inputting the REST API URL into the browser. The script successfully returned XML, however, when I would dig down to locate the requested properties, the rows within the table would be empty.

After further investigation, It might be an account related issue. I have Two account, one is my regular company account and my other is a cloud account which has the SharePoint Admin tenant role. Using the same REST API URL, my regular account is able to get the appropriate output through the browser vs my CA account.

My regular account and CA account have the same permissions to the content in question. Both are site collection admins + view access within the site.

I’m running my script with my CA account as I believe the account connecting to SPO service + PnP requires the SharePoint Admin role.

/r/sharepoint Thread Parent