SpanningCloudApps / SB365-Powershell

Spanning Backup for Office 365 REST API PowerShell Module
https://spanning.com
Apache License 2.0
11 stars 5 forks source link

Get-SpanningAssignedUsers only returning first 225 users #52

Closed Basicallyapenguin closed 2 years ago

Basicallyapenguin commented 2 years ago

Updated to the master releases because the Get-spanningassignedusers was only returning 225 users out of about 1500 assigned users. Still having the same issue. Get-spanningusers only returns 900 users as well. Not sure if that's the default but can't increase them to get all users or all assignedusers, how to do get all users now?

SPMatthewMcD commented 2 years ago

Can you try get-spanninguser -usertype Assigned and see if that cmdlet works for you. The default page size is 1000 users. Each cmdlet hides the page size details and returns the complete data set.

To avoid having to make multiple requests you can also use $users = get-spanninguser -usertype All and then filter only the assigned results from the $users variable.

Basicallyapenguin commented 2 years ago

First command still returns first 225 users. Second command still returns 900 users. No change.

SPMatthewMcD commented 2 years ago

Please send your admin user name, api key, and script to me at matt.mcdermott@spanning.com.

Basicallyapenguin commented 2 years ago

Just had it typed out to send you, decided to try it one more time and it's working and returning the correct number of users in all commands now. Not sure, ran the same script, same instance of PowewrShell was open as yesterday but it works now. Might have been a fluck with the API at the time yesterday or something. Thanks for your responses!

SPMatthewMcD commented 2 years ago

Strange, great to hear it's working for you. I'll close this issue and you can re-open it or open a new one if you have any other issues.