Skip to content

[BUG] Get-PnPUserOneDriveQuota reporting license maximum quota instead of actual quota #1554

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

Closed
1 of 6 tasks
adzero opened this issue Jan 25, 2022 · 6 comments · Fixed by #1902
Closed
1 of 6 tasks
Labels
bug Something isn't working reproduced Issue reproduced after testing

Comments

@adzero
Copy link

adzero commented Jan 25, 2022

Reporting an Issue

Get-PnPUserOneDriveQuota returns a value that is not equal to actual applied quota. Problem still occurs after using Set-PnPUserOneDriveQuota.

Expected behavior

The command should return the same quota as the one applied, displayed in administration center or returned by Get-SPOSite command.

Actual behavior

The value returned seems to be the maximum quota allowed by the user's license.

Here's an example getting one user quota and the actual quota applied to underlying SharePoint site collection.

image

Steps to reproduce behavior

$user = "someone@tenantdomain"
$TenantSPOAdminUrl = "https://tenant-admin.sharepoint.com"
$credentials = Get-Credential -Message "SPO admin account"
Connect-SPOService -Url $TenantSPOAdminUrl -Credential $credentials
Connect-PnPOnline -Url $TenantSPOAdminUrl -Credentials $credentials
(Get-PnPUserOneDriveQuota -Account $user | Select-Object -ExpandProperty Value)/(1024*1024)
Get-SPOSite -Identity ((Get-PnPUserProfileProperty -Account $user).personalurl -replace "/$","") | Select-Object -ExpandProperty StorageQuota

What is the version of the Cmdlet module you are running?

Using 1.9.0 version of the module

Which operating system/environment are you running PnP PowerShell on?

  • Windows
  • Linux
  • MacOS
  • Azure Cloud Shell
  • Azure Functions
  • Other : please specify
@adzero adzero added the bug Something isn't working label Jan 25, 2022
@veronicageek
Copy link
Collaborator

Indeed, seems it's not reporting the correct value.

FYI - @gautamdsheth @KoenZomers

@KoenZomers
Copy link
Collaborator

I cannot seem to reproduce it here. Works fine for me using the code shared in this issue. @veronicageek were you able to reproduce this issue?

@veronicageek
Copy link
Collaborator

Kind of. I didn't have the (default) 1TB in return, but for a user where I've set 20GB quota, it was giving me 5GB... 🤷🏻‍♀️

@KoenZomers
Copy link
Collaborator

I tried it against two accounts where I have the maximum value of 5 TB set and it reported back exactly that and exactly the same value through both SPO Mgmt Shell and PnP Posh.

@veronicageek
Copy link
Collaborator

Yes but can you set the quota to something else (i.e.: 20GB) and try again?

@veronicageek veronicageek added the reproduced Issue reproduced after testing label May 7, 2022
@veronicageek
Copy link
Collaborator

Still happening with 1.10.0

gautamdsheth added a commit to gautamdsheth/powershell that referenced this issue May 25, 2022
KoenZomers added a commit that referenced this issue Jun 14, 2022
Fix #1554 - issue with onedrive site storage quota
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working reproduced Issue reproduced after testing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants