Skip to content

Is it possible to return SignInActivity properties using PnP.PowerShell? #3541

Answered by AndersRask
cprovpo asked this question in Q&A
Discussion options

You must be logged in to vote

Yeah Newtonsoft Json is a bit hard to figure out in PowerShell for sure.
A little "hack" is to convert the Dictionary object you get back from additional properties to json and back, that will give you a PSObject that is easier to manage :-)
Also remember that your output may vary depending on if you get 1 or more logins back

$properties = $additionalProps | ConvertTo-Json | ConvertFrom-Json
$properties.signInActivity.lastSignInDateTime

Replies: 2 comments 10 replies

Comment options

You must be logged in to vote
7 replies
@gautamdsheth
Comment options

@AndersRask
Comment options

@cprovpo
Comment options

@AndersRask
Comment options

Answer selected by cprovpo
@cprovpo
Comment options

Comment options

You must be logged in to vote
3 replies
@AndersRask
Comment options

@cprovpo
Comment options

@AndersRask
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants