12Knocksinna / Office365itpros

Office 365 for IT Pros PowerShell examples
MIT License
1.24k stars 559 forks source link

GetUserSignInDataGraph.PS1 - Missing created date for onprem users skips those users #75

Closed massiveloop closed 1 year ago

massiveloop commented 1 year ago

TLDR; Modify script to still pull in hybrid users with null/blank CreatedDate

GetUserSignInDataGraph.PS1 script worked wonderfully for our needs of evaluating for stale guest users in our Azure AD! I just wanted to raise something I came across that might be a useful enhancement is possible. We are hybrid for internal users (syncing with AAD Connect) and I noticed that all onprem users that were created before the existence of our tenant are excluded from the output. I'm assuming this is because of a dependency for the CreatedDate in the flow but wondering if this is something that can be modified so we can still get last signons. Not the end of the world though since I can merge the data across onprem/cloud if needed.

12Knocksinna commented 1 year ago

I don't have a hybrid environment any more so I have no way to test any enhancement that might meet your needs. Maybe you can update the script yourself?