Skip to content

Fix #1554 - issue with onedrive site storage quota #1902

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 5 commits into from
Jun 14, 2022

Conversation

gautamdsheth
Copy link
Collaborator

Type

  • Bug Fix
  • New Feature
  • Sample

Related Issues?

Fixes #1554

What is in this Pull Request ?

Fix the one drive storage quota issue.
We need to get the storage quota level of the personal site itself and not the max quota.

@KoenZomers - need your help here :)

  1. Can we optimize it more to retrieve the site ?
  2. I had to add 1024 * 1024 , not sure why, but only after that it worked. Seems a bit flaky , need something more robust, any ideas ?

@KoenZomers
Copy link
Collaborator

Yikes, fetching ALL OneDrive sites in order to do this? There must hopefully be a more efficient way of achieving this. How can this be reproduced anyway? I couldn't repro it before. Is the catch here to set it to something less than the tenant configured maximum?

@gautamdsheth
Copy link
Collaborator Author

Yeah, the filter with URL didnt work, so had to fetch all sites :(

To repro this, you can just do:

Set-PnPUserOneDriveQuota -Account 'user@domain.com' -Quota 5368709120 -QuotaWarning 4831838208

and then use the above code.

@gautamdsheth
Copy link
Collaborator Author

@KoenZomers - managed to figure out an efficient way to filter the site for a specific user. Looks good to me now :)

@KoenZomers KoenZomers merged commit 5a6cd93 into pnp:dev Jun 14, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Get-PnPUserOneDriveQuota reporting license maximum quota instead of actual quota
2 participants