Forum Discussion

Brahmaiah's avatar
Brahmaiah
Brass Contributor
Oct 23, 2020
Solved

ServicePrincipal StartDate and EndDate not displaying Using Graph API In Power Shell

Hi,   I am trying to get list of SPNs that are going to expire soon. Using Graph API  I am executing below powershell script.   I am getting output appid and name always but StartDate and EndDate...
  • VasilMichev's avatar
    Oct 23, 2020

    Well what exactly is:

    $pwdcreds2

    as that's what you are using to parse for passwordCredentials. For the record, I can see them just fine in Graph explorer or calling the Graph API directly via PowerShell.

     

    $result = ($test.Content | ConvertFrom-Json).passwordCredentials.startDateTime

Resources