pnp / pnpcore

The PnP Core SDK is a modern .NET SDK designed to work for Microsoft 365. It provides a unified object model for working with SharePoint Online and Teams which is agnostic to the underlying API's being called
https://aka.ms/pnp/coresdk/docs
MIT License
296 stars 190 forks source link

Viva Announcement Library Result in GetPages Failed #1343

Closed RogerZhang-CatapultSystems closed 8 months ago

RogerZhang-CatapultSystems commented 8 months ago

Category

Describe the bug

We have ViVa Enabled in root site collection, then announcement library will be automatically created. image When we run Get Page cmdlets, it always give us not exists error, but actually there have 13 pages image. After investigation I found the PnP core code logics: Based on the site pages filter expression, announcements library match it. And in line 587, if have multiple results, it will take the first one. In my scenario, the announcements will be returned, which result in can't find pages in announcement library. image

I have tested the get pages cmdlets in PnP.Powershell module from 1.12.0 to latest, the issue always repro.

jansenbe commented 8 months ago

@RogerZhang-CatapultSystems : thanks for reporting this, I've just pushed a fix. The next nightly builds of PnP Core SDK and PnP PowerShell will have this fix. I'll close the issue, but please re-open or create a new one in case you still experience issues.