Get-EntraBetaServicePrincipalPolicy
Gets a servicePrincipal policy.
Syntax
Default (Default)
Get-EntraBetaServicePrincipalPolicy
-Id <String>
[<CommonParameters>]
Description
The Get-EntraBetaServicePrincipalPolicy cmdlet gets the policy of a service principal in Microsoft Entra ID. Specify the Id parameter to get a specific servicePrincipal policy.
Examples
Example 1: Get a policy
Connect-Entra -Scopes 'Policy.Read.All', 'Application.ReadWrite.All'
Get-EntraBetaServicePrincipalPolicy -Id 'bbbbbbbb-1111-1111-1111-cccccccccccc'
DisplayName Id AppId SignInAudience ServicePrincipalType
----------- -- ----- -------------- --------------------
demotest2 bbbbbbbb-1111-1111-1111-cccccccccccc ActivityBasedTimeoutPolicy
This command retrieves the policy for a specified service principal in Microsoft Entra ID.
-IdParameter specifies the ID of the Service Principal.
Parameters
-Id
The ID of the Service Principal for which you want to retrieve the policy.
Parameter properties
| Type: | System.String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | True |
| Value from pipeline by property name: | True |
| Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.