Request-GraphServicePrincipal
SYNOPSIS
Requests service principals from Microsoft Graph. Caches in global variable.
SYNTAX
Request-GraphServicePrincipal [-Cached] [-Test] [[-Xml] <Boolean>] [[-Return] <String>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
DESCRIPTION
Internal helper. Fetches all Entra ID service principals from Microsoft Graph and caches the result in a session-scoped global variable keyed by app ID and object ID. Used by Get-UserApplication, Find-RiskyApplication, and Get-AdminRole to resolve service principal identities without repeated Graph requests.
EXAMPLES
Example 1
PS C:\> {{ Add example code here }}
{{ Add example description here }}
PARAMETERS
-Cached
{{ Fill Cached Description }}
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-Test
{{ Fill Test Description }}
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-Xml
{{ Fill Xml Description }}
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: $Global:IRT_Config.ExportXml
Accept pipeline input: False
Accept wildcard characters: False
-Return
{{ Fill Return Description }}
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: Objects
Accept pipeline input: False
Accept wildcard characters: False
-ProgressAction
{{ Fill ProgressAction Description }}
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTS
OUTPUTS
NOTES
Version: 2.0.0