Comments on: Reporting on OneDrive for Business shared files https://practical365.com/reporting-on-onedrive-for-business-shared-files/ Practical Office 365 News, Tips, and Tutorials Tue, 28 Nov 2023 21:54:13 +0000 hourly 1 https://wordpress.org/?v=6.3.2 By: Tony Redmond https://practical365.com/reporting-on-onedrive-for-business-shared-files/#comment-282348 Tue, 28 Nov 2023 21:54:13 +0000 https://www.practical365.com/?p=46234#comment-282348 In reply to Andrey Melnichuck.

You haven’t managed to retrieve an access token. That implies that the app and the secret you’re using are invalid in some way.

]]>
By: Andrey Melnichuck https://practical365.com/reporting-on-onedrive-for-business-shared-files/#comment-282342 Tue, 28 Nov 2023 20:01:35 +0000 https://www.practical365.com/?p=46234#comment-282342 VERBOSE: No access token found, aborting…
ScriptHalted
At C:\_Scripts\_SPO_Admin_Scripts\_michevnew\Graph_ODFB_shared_files.ps1:228 char:77
+ … Header) { Write-Verbose “No access token found, aborting…”; throw }
+ ~~~~~
+ CategoryInfo : OperationStopped: (:) [], RuntimeException
+ FullyQualifiedErrorId : ScriptHalted

]]>
By: Aaron https://practical365.com/reporting-on-onedrive-for-business-shared-files/#comment-280009 Tue, 07 Nov 2023 19:12:20 +0000 https://www.practical365.com/?p=46234#comment-280009 In reply to David A..

Just adding this because I was trying to figure this out as well. I just changed the $filter on this line:

$uri = “https://graph.microsoft.com/v1.0/users/?`$select=displayName,mail,userPrincipalName,id,userType&`$top=999&`$filter=userType eq ‘Member'”

to

$uri = “https://graph.microsoft.com/v1.0/users/?`$select=displayName,mail,userPrincipalName,id,userType&`$top=999&`$filter=userPrincipalName eq ‘myuser@mydomain.com”

I’m betting it’s not best way, but it gets the job done.

Great script btw, thanks.

]]>
By: CK https://practical365.com/reporting-on-onedrive-for-business-shared-files/#comment-272351 Fri, 18 Aug 2023 21:36:36 +0000 https://www.practical365.com/?p=46234#comment-272351 In reply to Tony Redmond.

Also thanks for the $GraphUsers suggestion. I was able to accomplish what I wanted 🙂

]]>
By: CK https://practical365.com/reporting-on-onedrive-for-business-shared-files/#comment-272350 Fri, 18 Aug 2023 21:34:50 +0000 https://www.practical365.com/?p=46234#comment-272350 In reply to Tony Redmond.

The author updated the script last year on his personal site: https://www.michev.info/blog/post/3631/updated-version-of-the-odfb-shared-files-report-powershell-script-2022

]]>
By: Tony Redmond https://practical365.com/reporting-on-onedrive-for-business-shared-files/#comment-272323 Fri, 18 Aug 2023 09:49:24 +0000 https://www.practical365.com/?p=46234#comment-272323 In reply to CK.

Always be careful when running a script first written 4 years ago. Things might have changed since and the author might have updated their script since the publication of the article.

As to the question, the script processes accounts stored in a variable (array) called $GraphUsers. It should be enough to fetch a subset of users and populate that array before running the rest of the script.

]]>
By: CK https://practical365.com/reporting-on-onedrive-for-business-shared-files/#comment-272301 Thu, 17 Aug 2023 22:31:14 +0000 https://www.practical365.com/?p=46234#comment-272301 This script looks freakin’ awesome and I’m excited to try it out. I have the script running but two things:
1. I have 6000+ users to process. I’m not well-versed on how to modify the script to accept a CSV so I can chunk my users into manageable sets. Can a kind soul offer help?
2. The script on Github seems to comment out the Export-CSV on line 318. But the write-up in this article says that the script outputs to file by default?

]]>
By: O365Dude https://practical365.com/reporting-on-onedrive-for-business-shared-files/#comment-257759 Tue, 28 Mar 2023 19:23:51 +0000 https://www.practical365.com/?p=46234#comment-257759 Great Script and was able to get it working! What are some best options to filter out to show the folks that have just root access to other users OneDrive in the CSV output?

]]>
By: Joël https://practical365.com/reporting-on-onedrive-for-business-shared-files/#comment-247158 Wed, 16 Nov 2022 10:22:39 +0000 https://www.practical365.com/?p=46234#comment-247158 In reply to Shaun.

Hi Shaun,

I am also trying since few times, how to report the shared files of our company (mainly SharePoint but also One Drive) with a powershell script to automate that all. I already tried to implement this using ExchangeOnline and PNPOnline, but the results are not completely satisfying. I wanted to ask you if you could share your script with us because me and probably a lot of other people are precisely looking for the same use case.

Best Regards

Joël

]]>
By: Long https://practical365.com/reporting-on-onedrive-for-business-shared-files/#comment-245187 Thu, 20 Oct 2022 16:43:55 +0000 https://www.practical365.com/?p=46234#comment-245187 In reply to Ibrahim Benna.

Can you try with -UseBasicParsing in all your invoke-webrequest :
(Invoke-WebRequest -Uri “$URI” -Verbose:$VerbosePreference -Headers $authHeader -UseBasicParsing -ErrorAction Stop)

Kind regards

]]>