Comments (3)
This is an old script (3 years) and I wouldn't use this approach to get sign in data for users anymore.
https://office365itpros.com/2022/09/29/underused-accounts-report/ explains how to use the Microsoft Graph PowerShell SDK cmdlet Get-MgUser to fetch information about users (including signins) with a command like:
[Array]$Users = Get-MgUser -Filter "assignedLicenses/`$count ne 0 and userType eq 'Member'" -ConsistencyLevel eventual -CountVariable Records -All -Property signInActivity | Sort-Object DisplayName
I think that's a better approach.
Anyway, the reason why the call is failing is that the Azure AD team has limited fetches to 120 objects at a time. That's a recent change:
{"error":{"code":"UnknownError","message":"{"@odata.context":"http://reportingservice.act
ivedirectory.windowsazure.com/auditLogs/$metadata#Edm.String","value":"Cannot query
data for more than 120 users at a time."}","innerError":{"date":"2023-04-01T09:43:21","requ
est-id":"c51d7e23-0469-405d-9170-4206e25af69d","client-request-id":"c51d7e23-0469-405d-9170-
4206e25af69d"}}}
Change the $top=999 to $top=100 and the command will run. The backtick is necessary to escape the $ character in PowerShell.
from office365itpros.
The script contained an ‘ before $top=999 on line 30. I removed this ' and the script ran successfully.
from office365itpros.
I´m getting the same error. The problem is, if I remove de backtick, $select and $top is ignored.
from office365itpros.
Related Issues (20)
- TeamsGroupsActivityReportV5.PS1 - Line 105 single quotes? HOT 1
- ArchiveMicrosoft365Groups.PS1 - Set-TeamArchivedState HOT 1
- Access is denied. Check credentials and try again. HOT 1
- Display name column show numbers HOT 1
- Not Removing Service plans HOT 2
- Doesn't include 3rd party Software authenticators HOT 1
- Missing Closing Curly Brace HOT 1
- GetUserSignInDataGraph.PS1 - Missing created date for onprem users skips those users HOT 1
- FindTeamChannelsWithWiki.PS1 - Authentication Error HOT 1
- ReportRoomMailboxUsage.PS1 has creds it HOT 1
- (401) Unauthorized - GetUserSignInDataGraph.PS1 HOT 1
- AssignedLicenses and -SignInActivity not working HOT 1
- You cannot call a method on a null-valued expression. HOT 8
- TeamsGroupsActivityReportV5.PS1 --> "getTeamsTeamActivityDetail" not work HOT 2
- Teams Activity Data returning only 200 items HOT 3
- Small bug with Fix HOT 3
- issue with line 38 on Analyze-MailtrafficUsers.PS1 HOT 1
- new error for GetUserSignInDataGraph HOT 3
- FindObsoleteGuestsByActivityV3 script with error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from office365itpros.