Find-EntraPermission

Hiermee kunnen gebruikers de benodigde machtigingen voor resources bepalen en de juiste machtigingen identificeren die vereist zijn voor verschillende opdrachten.

Syntax

Find-EntraPermission

    [-SearchString] <String>
    [-ExactMatch]
    [-PermissionType <String>]
    [-Online]
    [<CommonParameters>]

All

Find-EntraPermission

    [-PermissionType <String>]
    [-Online]
    [-All]
    [<CommonParameters>]

Description

Met de Find-EntraPermission cmdlet kunnen gebruikers de benodigde machtigingen voor resources bepalen en de juiste machtigingen identificeren die vereist zijn voor verschillende opdrachten.

Voorbeelden

Voorbeeld 1: Een lijst met alle toepassingsmachtigingen ophalen

Find-EntraPermission application
PermissionType: Delegated

Id                                   Consent Name                                      Description
--                                   ------- ----                                      -----------
c79f8feb-a9db-4090-85f9-90d820caa0eb Admin   Application.Read.All                      Allows the app to read applications and service principals on behalf of the signed-in user.
bdfbf15f-ee85-4955-8675-146e8e5296b5 Admin   Application.ReadWrite.All                 Allows the app to create, read, update and delete applications and service principals on behalf of the signed-in user. Does not allow management of consent grants.

PermissionType: Application

Id                                   Consent Name                                      Description
--                                   ------- ----                                      -----------
9a5d68dd-52b0-4cc2-bd40-abcf44ac3a30 Admin   Application.Read.All                      Allows the app to read all applications and service principals without a signed-in user.
1bfefb4e-e0b5-418b-a88f-73c46d2cc8e9 Admin   Application.ReadWrite.All                 Allows the app to create, read, update and delete applications and service principals without a signed-in user.  Does not allow management of consent grants.
18a4783c-866b-4cc7-a460-3d5e5662c884 Admin   Application.ReadWrite.OwnedBy             Allows the app to create other applications, and fully manage those applications (read, update, update application secrets and delete), without a signed-in user...

Voorbeeld 2. Een lijst met machtigingen voor de leesmachtigingen ophalen

Find-EntraPermission application.Read | Format-List
Id             : c79f8feb-a9db-4090-85f9-90d820caa0eb
PermissionType : Delegated
Consent        : Admin
Name           : Application.Read.All
Description    : Allows the app to read applications and service principals on behalf of the signed-in user.

Id             : bdfbf15f-ee85-4955-8675-146e8e5296b5
PermissionType : Delegated
Consent        : Admin
Name           : Application.ReadWrite.All
Description    : Allows the app to create, read, update and delete applications and service principals on behalf of the signed-in user. Does not allow management of consent grants.

Id             : 9a5d68dd-52b0-4cc2-bd40-abcf44ac3a30
PermissionType : Application
Consent        : Admin
Name           : Application.Read.All
Description    : Allows the app to read all applications and service principals without a signed-in user.

Voorbeeld 3. Zoeken naar machtigingen met exacte overeenkomst

Find-EntraPermission -SearchString 'User.Read.All' -ExactMatch
   PermissionType: Delegated

Id                                   Consent Name          Description
--                                   ------- ----          -----------
a154be20-db9c-4678-8ab7-66f6cc099a59 Admin   User.Read.All Allows the app to read the full set of profile properties, reports, and ma…

   PermissionType: Application

Id                                   Consent Name          Description
--                                   ------- ----          -----------
df021288-bdef-4463-88db-98f22de89214 Admin   User.Read.All Allows the app to read user profiles without a signed in user.

In dit voorbeeld ziet u hoe u kunt zoeken naar machtigingen die exact overeenkomen met een opgegeven machtigingsnaam.

Voorbeeld 4. Alle machtigingen van het opgegeven type ophalen

Find-EntraPermission -PermissionType 'Delegated'
Id                                   Consent Name                                                    Description
--                                   ------- ----                                                    -----------
ebfcd32b-babb-40f4-a14b-42706e83bd28 Admin   AccessReview.Read.All                                   Allows the app to read access re…
e4aa47b9-9a69-4109-82ed-36ec70d85ff1 Admin   AccessReview.ReadWrite.All                              Allows the app to read, update, …
5af8c3f5-baca-439a-97b0-ea58a435e269 Admin   AccessReview.ReadWrite.Membership                       Allows the app to read,

In dit voorbeeld ziet u hoe u alle machtigingen van een opgegeven type kunt ophalen, bijvoorbeeld Delegated of Application machtigingen.

Parameters

-All

Hiermee stelt u in of de cmdlet alle parameters retourneert.

Parametereigenschappen

Type:System.Management.Automation.SwitchParameter
Default value:False
Ondersteunt jokertekens:False
DontShow:False

Parametersets

(All)
Position:Named
Verplicht:False
Waarde uit pijplijn:False
Waarde uit pijplijn op eigenschapsnaam:False
Waarde van resterende argumenten:False

-ExactMatch

Hiermee stelt u in of de zoekreeks een exacte overeenkomst moet zijn.

Parametereigenschappen

Type:System.Management.Automation.SwitchParameter
Default value:False
Ondersteunt jokertekens:False
DontShow:False

Parametersets

(All)
Position:Named
Verplicht:False
Waarde uit pijplijn:False
Waarde uit pijplijn op eigenschapsnaam:False
Waarde van resterende argumenten:False

-Online

Gebruik de parameter -Online met -SearchString in Find-MgGraphPermission om de meest recente machtigingen op te halen uit Microsoft Graph voordat u zoekt. Dit zorgt ervoor dat Find-MgGraphPermission nauwkeurige resultaten retourneert door nieuwe machtigingen op te geven die zijn toegevoegd voor recente API's. De opdracht maakt gebruik van de bestaande Microsoft Graph verbinding gemaakt door Connect-MgGraph. Als uw verbinding geen machtigingen heeft voor toegang tot deze gegevens of als er geen netwerkverbinding is, mislukt de opdracht. Zodra dit is bijgewerkt, blijft Find-MgGraphPermission de vernieuwde machtigingenlijst gebruiken voor toekomstige zoekopdrachten, zelfs zonder de parameter -Online.

Parametereigenschappen

Type:System.Management.Automation.SwitchParameter
Default value:False
Ondersteunt jokertekens:False
DontShow:False

Parametersets

(All)
Position:Named
Verplicht:False
Waarde uit pijplijn:False
Waarde uit pijplijn op eigenschapsnaam:False
Waarde van resterende argumenten:False

-PermissionType

Hiermee geeft u het type machtiging op, bijvoorbeeld Gedelegeerd of Toepassing.

Parametereigenschappen

Type:System.String
Default value:Any
Ondersteunt jokertekens:False
DontShow:False

Parametersets

(All)
Position:Named
Verplicht:False
Waarde uit pijplijn:False
Waarde uit pijplijn op eigenschapsnaam:False
Waarde van resterende argumenten:False

-SearchString

Hiermee geeft u het filter voor de machtigingen, bijvoorbeeld domein en bereik.

Parametereigenschappen

Type:System.String
Default value:None
Ondersteunt jokertekens:False
DontShow:False

Parametersets

(All)
Position:Named
Verplicht:True
Waarde uit pijplijn:True
Waarde uit pijplijn op eigenschapsnaam:True
Waarde van resterende argumenten:False

CommonParameters

Deze cmdlet ondersteunt de algemene parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction en -WarningVariable. Zie about_CommonParametersvoor meer informatie.