![]() ![]() Push notifications to users' OneDrive and SharePoint mobile apps, if configured. It also presents a view of the documents the user has shared with others, which is a view of the permissions the user has set on the items in their OneDrive account. Most of this information can be accessed by end users using the corresponding in-product features listed in the following table: ExperienceĪ list of documents shared with the user by others. The published service limits for these particular Graph resources are completely void of any detail ( ).A user's Microsoft OneDrive experience stores information to help the user find and navigate to content of interest to them. ![]() retry-after), but I’ve found when that is necessary, being able to handle those in batches is more efficient. On the other hand, I could aim to handle the 429 responses’ (i.e. I’ve thought about using the /$batch resource for JSON batching, but that does through a wrench into it when there are so many (overall/and) different requests to send. – Did you have a chance to test this for large sets of users/folders/files, and encounter any throttling? – How come you used the Beta endpoint? I ask because I didn’t spot anything that I hadn’t seen in the v1.0 reference. I wonder if you could share a few details: You’ve made a lot of things come together and look easy! I will likely use this for reference while I build a similar script for use with OneDrive (personal/business) and SharePoint Online document libraries. WriteTofile -file $item -filepath $filepath #ELSE NOT Folder, then it's a file, sent to write output $apiUri = '' + $erprincipalname + '/drive/root/children'Įxpandfolders -folder $item -filepath $filepath $token = GetGraphToken -clientID $clientId -TenantID $tenantId -clientSecret $clientSecret LinkPermissions = $erprincipalnameĭirectPermissions = $permissions.DirectPermissionsĭirectPermissions = $ -join (' ') LastModified = $File.lastModifiedDateTimeĭirectPermissions = $permission.DirectPermissions Write-host $item.name is a folder, passing $filePath as path $Data = RunQueryandEnumerateResults -ApiUri $apiUri -Token $token Write-host $filePath -ForegroundColor yellow Write-host retrieved $filePath -ForegroundColor green ![]() $token = ($tokenRequest.Content | ConvertFrom-Json).access_token $tokenRequest = Invoke-WebRequest -Method Post -Uri $uri -ContentType "application/x-www-form-urlencoded" -Body $body -UseBasicParsing # NOT FOR PRODUCTION USE! USE AT YOUR OWN RISK #Details: Used as a Graph/PowerShell example, The script contents are detailed below, as always, please don’t run online scripts directly in your production environment until you understand them and tailor them to your needs, this script is just an example. UserListCSV – This is a CSV with the heading UserPrincipalName and the UPNs of each user you want to checkįor the Application Registration, you will need the and permissions assigned.ClientSecret – This is a secret generated for the application registration.TenentID – This is the AAD Directory ID.ClientID – This is the client ID of the application registration detailed below.To run the script, import the module as before and run as below: getonedrivereport -ClientID -TenentID -ClientSecret -UserListCSV The script which is available on GitHub here can be used as a template for similar requirements. I’ve enhanced the earlier report and created a new script to add the additional details required. This information is not easy to get as the reports in the Microsoft 365 Admin Center focus on recent activity rather than ‘as-is’ state. I’ve recently had a requirement to add to that script, I didn’t just need the file structure, but also any details on any sharing that was in place. This script used PowerShell and Graph API to loop through all files and folders and output the information to a CSV. I’ve previously posted a PowerShell script I put together to report the file and folder structure in OneDrive. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |