Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to retrieve App System Assigned Identity Object Id using Azure Powershell

I'm using Azure Powershell 3.8.0

I'm trying to fetch the Object ID that can be seen in this screen:

Identity

I tried using the following:

PS> (Get-AzResource -Name  "func-example").Identity.PrincipalId

But it does not match the Object ID.

then also:

PS> (Get-AzWebApp -Name  "func-example" -ResourceGroupName RGNAME).Identity

But also does not match

Does anyone know how to fetch that ID using Azure Powershell?

like image 365
Claudiordgz Avatar asked Oct 25 '25 22:10

Claudiordgz


1 Answers

You can do this,

With PowerShell :

Get-AzADServicePrincipal -DisplayName 'func-example'

With CLI :

az ad sp list --display-name 'func-example'
like image 189
Sajeetharan Avatar answered Oct 27 '25 11:10

Sajeetharan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!