external help file | Module Name | ms.assetid | ms.custom | ms.reviewer | online version | schema |
---|---|---|---|---|---|---|
Microsoft.Open.AzureAD16.Graph.PowerShell.dll-Help.xml |
AzureADPreview |
DCED77C4-3206-40A8-A5CA-7A08B9EBA1CF |
iamfeature=PowerShell |
rodejo |
2.0.0 |
Gets an oAuth2PermissionGrant object.
Get-AzureADServicePrincipalOAuth2PermissionGrant -ObjectId <String> [-All <Boolean>] [-Top <Int32>]
[<CommonParameters>]
The Get-AzureADServicePrincipalOAuth2PermissionGrant cmdlet gets an oAuth2PermissionGrant object for a service principal in Azure Active Directory (AD).
PS C:\> ServicePrincipalId = (Get-AzureADServicePrincipal -Top 1).ObjectId
PS C:\> Get-AzureADServicePrincipalOAuth2PermissionGrant -ObjectId $ServicePrincipalId
The first command gets the ID of a service principal by using the Get-AzureADServicePrincipal cmdlet. The command stores the ID in the $ServicePrincipalId variable.
The second command gets the OAuth2 permission grants of a service principal identified by $ServicePrincipalId.
If true, return all permission grants. If false, return the number of objects specified by the Top parameter
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
Specifies the ID of a service principal in Azure AD.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
Specifies the maximum number of records to return.
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.