> ## Documentation Index
> Fetch the complete documentation index at: https://ps365.clidsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get MgApplicationAssignment

## SYNOPSIS

Retrieves all Entra ID applications and their assignment types.

## SYNTAX

### All (Default)

```powershell theme={null}
Get-MgApplicationAssignment [-AllApplications] [-AssignmentNotEnforced] [-AssignmentEmpty] [-ExportToExcel]
 [-ExportPath <String>] [-DisableParallel] [-ThrottleLimit <Int32>] [-ProgressAction <ActionPreference>]
 [<CommonParameters>]
```

### ByApplicationId

```powershell theme={null}
Get-MgApplicationAssignment [[-ApplicationId] <String[]>] [-AssignmentNotEnforced] [-AssignmentEmpty]
 [-ExportToExcel] [-ExportPath <String>] [-DisableParallel] [-ThrottleLimit <Int32>]
 [-ProgressAction <ActionPreference>] [<CommonParameters>]
```

### ByObjectId

```powershell theme={null}
Get-MgApplicationAssignment [-ObjectID <String>] [-AssignmentNotEnforced] [-AssignmentEmpty] [-ExportToExcel]
 [-ExportPath <String>] [-DisableParallel] [-ThrottleLimit <Int32>] [-ProgressAction <ActionPreference>]
 [<CommonParameters>]
```

### ByDisplayName

```powershell theme={null}
Get-MgApplicationAssignment [-DisplayName <String>] [-AssignmentNotEnforced] [-AssignmentEmpty]
 [-ExportToExcel] [-ExportPath <String>] [-DisableParallel] [-ThrottleLimit <Int32>]
 [-ProgressAction <ActionPreference>] [<CommonParameters>]
```

## DESCRIPTION

This function returns a list of all Entra ID applications with their assignment information,
identifying whether they are assigned to all users or have specific assignments.
If no assignments exist, it indicates whether the application is available to "all users".
Give information about assigned users, groups, or service principals and if the group is protected/static/dynamic.

## EXAMPLES

### EXAMPLE 1

```powershell theme={null}
Get-MgApplicationAssignment
```

Retrieves all applications and their assignment types.

### EXAMPLE 2

```powershell theme={null}
Get-MgApplicationAssignment -DisableParallel
```

Forces sequential processing even on PowerShell 7+ (useful for debugging or to avoid concurrent Graph calls).

### EXAMPLE 3

```powershell theme={null}
Get-MgApplicationAssignment -ApplicationId "xxx", "yyy"
```

Retrieves assignment types for the specified application IDs.

### EXAMPLE 4

```powershell theme={null}
Get-MgApplicationAssignment -ObjectID '11111111-2222-3333-4444-555555555555'
```

Retrieves assignment types for the service principal matching this ObjectID.

### EXAMPLE 5

```powershell theme={null}
Get-MgApplicationAssignment -DisplayName 'My SAML App'
```

Retrieves assignment types for the service principal matching this DisplayName.

### EXAMPLE 6

```powershell theme={null}
Get-MgApplicationAssignment -AssignmentEmpty
```

Retrieves only applications with no specific user/group/service principal assignments.

### EXAMPLE 7

```powershell theme={null}
Get-MgApplicationAssignment -ExportToExcel
```

Gets all applications and exports them to an Excel file

## PARAMETERS

### -ApplicationId

(Optional) One or more Application IDs (AppId) to filter the results.
If not provided, all
applications will be processed.

```yaml theme={null}
Type: String[]
Parameter Sets: ByApplicationId
Aliases:

Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -ObjectID

(Optional) ObjectID (GUID) of a single service principal to target.
Cannot be combined with -ApplicationId or -DisplayName.

```yaml theme={null}
Type: String
Parameter Sets: ByObjectId
Aliases: Identity

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -DisplayName

(Optional) Display name of a single service principal to target (exact match, with fallback on trimmed comparison).
Cannot be combined with -ApplicationId or -ObjectID.

```yaml theme={null}
Type: String
Parameter Sets: ByDisplayName
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -AllApplications

(Optional) If specified, retrieves all service principals regardless of type.
By default, only Enterprise Applications (tagged 'WindowsAzureActiveDirectoryIntegratedApp') are returned.

```yaml theme={null}
Type: SwitchParameter
Parameter Sets: All
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```

### -AssignmentNotEnforced

(Optional) If specified, only applications where AppRoleAssignmentRequired is \$false (open to all users, no assignment needed)
will be returned.

```yaml theme={null}
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```

### -AssignmentEmpty

(Optional) If specified, only applications with no specific user/group/service principal assignments will be returned.
Note: these apps may still be accessible to all users if AppRoleAssignmentRequired is \$false.

```yaml theme={null}
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```

### -ExportToExcel

(Optional) If specified, exports the results to an Excel file in the user's profile directory.

```yaml theme={null}
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```

### -ExportPath

Optional output directory for the Excel export (defaults to the user profile).

```yaml theme={null}
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -DisableParallel

(Optional) Forces sequential processing.
By default, on PowerShell 7+ the function analyzes applications in
parallel (ForEach-Object -Parallel) to speed up processing; on PowerShell 5.1 it always runs sequentially.

```yaml theme={null}
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```

### -ThrottleLimit

(Optional) Maximum number of concurrent runspaces when running in parallel.
Default is 5.
Keep this value moderate to avoid Microsoft Graph throttling (HTTP 429).

```yaml theme={null}
Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: 5
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](http://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

## OUTPUTS

## NOTES

## RELATED LINKS

[https://ps365.clidsys.com/docs/commands/Get-MgApplicationAssignment](https://ps365.clidsys.com/docs/commands/Get-MgApplicationAssignment)
