Comments on: Use Graph APIs to Create a Report of Files in a SharePoint Online Site https://practical365.com/sharepoint-site-files-report/ Practical Office 365 News, Tips, and Tutorials Wed, 13 Mar 2024 15:27:27 +0000 hourly 1 https://wordpress.org/?v=6.6.1 By: <div class="apbct-real-user-wrapper"> <div class="apbct-real-user-author-name">Tony Redmond</div> <div class="apbct-real-user-badge" onmouseover=" let popup = document.getElementById('apbct_trp_comment_id_290111'); popup.style.display = 'inline-flex'; "> <div class="apbct-real-user-popup" id="apbct_trp_comment_id_290111"> <div class="apbct-real-user-title"> <p class="apbct-real-user-popup-header">The Real Person!</p> <p class="apbct-real-user-popup-text">Author <b>Tony Redmond</b> acts as a real person and passed all tests against spambots. Anti-Spam by CleanTalk.</p> </div> </div> </div> </div> https://practical365.com/sharepoint-site-files-report/#comment-290111 Wed, 13 Mar 2024 15:27:27 +0000 https://practical365.com/?p=56778#comment-290111 In reply to Aneesh Raghavan.

The problem might be a bug in the underlying API. The nextlink is simply a URL pointing to the next page of data that a Graph query finds, so it’s the responsibility of the underlying workload to provide that data by responding to the request in the nextlink URL. I haven’t seen a problem with the nextlink in my tests but I am not running code against your sites and document libraries. If you have a problem, you should report it to Microsoft and have their engineers look at code running in your tenant. I can only guess at what might be happening and I prefer not to guess.

]]>
By: Aneesh Raghavan https://practical365.com/sharepoint-site-files-report/#comment-290110 Wed, 13 Mar 2024 15:20:52 +0000 https://practical365.com/?p=56778#comment-290110 In reply to Tony Redmond.

Hi Tony,
Thank you for the script. I think it’s the only one available in public domain with Graph API approach.
I am experiencing the same loop problem described above and removing the -IsNextLink $true is not fixing it either. It’s happening with folders with more than 100 items specifically and it takes several cycles to exit the loop. For folder with more than few thousand items, the loop goes on forever. If you can point me in right direction will be greatful

]]>
By: <div class="apbct-real-user-wrapper"> <div class="apbct-real-user-author-name">Tony Redmond</div> <div class="apbct-real-user-badge" onmouseover=" let popup = document.getElementById('apbct_trp_comment_id_289683'); popup.style.display = 'inline-flex'; "> <div class="apbct-real-user-popup" id="apbct_trp_comment_id_289683"> <div class="apbct-real-user-title"> <p class="apbct-real-user-popup-header">The Real Person!</p> <p class="apbct-real-user-popup-text">Author <b>Tony Redmond</b> acts as a real person and passed all tests against spambots. Anti-Spam by CleanTalk.</p> </div> </div> </div> </div> https://practical365.com/sharepoint-site-files-report/#comment-289683 Thu, 07 Mar 2024 20:38:51 +0000 https://practical365.com/?p=56778#comment-289683 In reply to john c. katzendorn.

I think this is possible using the https://learn.microsoft.com/en-us/graph/api/itemactivitystat-getactivitybyinterval?view=graph-rest-1.0&tabs=http ItemActivityStat API.

]]>
By: john c. katzendorn https://practical365.com/sharepoint-site-files-report/#comment-289676 Thu, 07 Mar 2024 19:01:54 +0000 https://practical365.com/?p=56778#comment-289676 Tony, hello. Could this approach be used to capture File Statistics (# of views in a time frame, for each file in a targeted DL)? (We can see those stats when a specific file is selected, then details in the file ‘fly-out’, then views in that fly-out details pane for the specific file (last 4, 30, 60 days time frames..)

]]>
By: Tony Redmond https://practical365.com/sharepoint-site-files-report/#comment-284933 Tue, 02 Jan 2024 17:00:44 +0000 https://practical365.com/?p=56778#comment-284933 In reply to JS.

I have no idea . I just looked at the script for the first time in about 18 months and made some slight updates to take account of the current SDK version and make Visual Studio happy with the code (it doesn’t like shortcuts like ? for Where-Object). The code in the UnpackFilesRecursively function looks OK and worked well when I tried it with a couple of document libraries. But hey, it’s PowerShell, so feel free to investigate and fix any bugs you find!

]]>
By: JS https://practical365.com/sharepoint-site-files-report/#comment-284929 Tue, 02 Jan 2024 16:19:08 +0000 https://practical365.com/?p=56778#comment-284929 Hi Tony,
Thank you for all of the great tutorials and scripts, they provide a great starting point and are very helpful when trying to understand how to approach a task using PowerShell.

That said, I’ve encountered an issue in “While ($NextLink) Loop” in the “ReportFilesSPOSite.PS1” script.
I’ve found 3 instances in our tenant where will continuously loop without exiting.
In all cases the $Nextlink variable doesn’t change, and the output is the same for 2 cycles, then it returns and starts the looping over the same folder again.

I’ve found that I’m able to get around the issue by removing “-IsNextLink $true” from:
UnpackFilesRecursively -Items $MoreData -SiteUri $SiteUri -FolderPath $FolderPath -SiteFiles $SiteFiles -IsNextLink $true

Can you explain why -IsNextLink $true needed here?
Any ideas on what could be happening?

Thank you!

]]>
By: <div class="apbct-real-user-wrapper"> <div class="apbct-real-user-author-name">Tony Redmond</div> <div class="apbct-real-user-badge" onmouseover=" let popup = document.getElementById('apbct_trp_comment_id_281531'); popup.style.display = 'inline-flex'; "> <div class="apbct-real-user-popup" id="apbct_trp_comment_id_281531"> <div class="apbct-real-user-title"> <p class="apbct-real-user-popup-header">The Real Person!</p> <p class="apbct-real-user-popup-text">Author <b>Tony Redmond</b> acts as a real person and passed all tests against spambots. Anti-Spam by CleanTalk.</p> </div> </div> </div> </div> https://practical365.com/sharepoint-site-files-report/#comment-281531 Mon, 20 Nov 2023 14:22:52 +0000 https://practical365.com/?p=56778#comment-281531 In reply to Paul Conaty.

https://practical365.com/report-sensitivity-labels-sharepoint-online/

]]>
By: Paul Conaty https://practical365.com/sharepoint-site-files-report/#comment-281529 Mon, 20 Nov 2023 14:20:44 +0000 https://practical365.com/?p=56778#comment-281529 Could this be used to determine files with and without a Retention label applied? Would be useful for tracking rollout of labels.

]]>
By: <div class="apbct-real-user-wrapper"> <div class="apbct-real-user-author-name">Tony Redmond</div> <div class="apbct-real-user-badge" onmouseover=" let popup = document.getElementById('apbct_trp_comment_id_241704'); popup.style.display = 'inline-flex'; "> <div class="apbct-real-user-popup" id="apbct_trp_comment_id_241704"> <div class="apbct-real-user-title"> <p class="apbct-real-user-popup-header">The Real Person!</p> <p class="apbct-real-user-popup-text">Author <b>Tony Redmond</b> acts as a real person and passed all tests against spambots. Anti-Spam by CleanTalk.</p> </div> </div> </div> </div> https://practical365.com/sharepoint-site-files-report/#comment-241704 Mon, 08 Aug 2022 15:15:31 +0000 https://practical365.com/?p=56778#comment-241704 In reply to Laura.

$Site.CreatedDateTime

Friday 29 May 2015 10:18:05

]]>
By: Laura https://practical365.com/sharepoint-site-files-report/#comment-241702 Mon, 08 Aug 2022 15:04:22 +0000 https://practical365.com/?p=56778#comment-241702 I’m trying to call the creation date of the sharepoint sites in the api graph report, but I can’t get it to bring me data, I don’t know if I’m correctly calling the field $Site.” createdDateTime”

]]>