lightupdifire's avatar
lightupdifire
Brass Contributor
Apr 19, 2021
Status:
New

Graph API | Get authentication method via PowerShell

Hello,

Would be great if can add/get value from the "@odata.type", as an example, if we try to get a list of Authentication Methods for a user and looking for specific like "Passwordless", then when running Graph Explorer/Powershell, the following is received back:

    {
        "@odata.type": "#microsoft.graph.passwordlessMicrosoftAuthenticatorAuthenticationMethod",
        "id": "hidden",
        "displayName": "hidden",
        "creationDateTime": "2021-01-23T06:54:43Z",
        "createdDateTime": "2021-01-23T06:54:43Z"
    },

And because the need is to report who has enrolled in Passwordless, then the metadata type:

"@odata.type": "#microsoft.graph.passwordlessMicrosoftAuthenticatorAuthenticationMethod", not really readable... and multiple Authentication Methods can exist per user.

If metadata type will be as a value as well, then it would be much better, as an example:

    {
        "@odata.type": "#microsoft.graph.passwordlessMicrosoftAuthenticatorAuthenticationMethod",
        "id": "hidden",
        "displayName": "hidden",

"type": "microsoft.graph.passwordlessMicrosoftAuthenticatorAuthenticationMethod",
"creationDateTime": "2021-01-23T06:54:43Z",
"createdDateTime": "2021-01-23T06:54:43Z"
},

 

https://docs.microsoft.com/en-us/graph/api/microsoftauthenticatorauthenticationmethod-list?view=graph-rest-beta&tabs=http

No CommentsBe the first to comment