Skip to content

🪲 Set-EntraBetaApplication -PreAuthorizedApplications parameter is silently ignored #1575

@arnor-ingthorsson

Description

@arnor-ingthorsson

Describe the bug

The -PreAuthorizedApplications parameter in Set-EntraBetaApplication is defined in the function signature but is never processed in the PROCESS block. The parameter accepts input but nothing seems to be done with it.

To Reproduce

Steps to reproduce the behavior:

$app = Get-EntraBetaApplication -ApplicationId 'your-app-id'

Set-EntraBetaApplication -ApplicationId $app.Id -PreAuthorizedApplications @(@{ appId = 'client-app-id'; permissionIds = @( 'permission-id') })

(Get-EntraBetaApplication -ApplicationId $app.id).Api | Format-List

This should show that preAuthorizedApplications remains unchanged.

Expected behavior

The cmdlet should process the -PreAuthorizedApplications parameter and update the application's API preauthorized applications list.

Debug Output

⚠ ATTENTION: Be sure to remove any sensitive information that may be in the logs.

Debug Output DEBUG: ============================ TRANSFORMATIONS ============================ DEBUG: =========================================================================

DEBUG: ============================ TRANSFORMATIONS ============================
DEBUG: WarningAction : SilentlyContinue
DEBUG: Debug : True
DEBUG: ApplicationId : REDACTED
DEBUG: =========================================================================

DEBUG: [CmdletBeginProcessing]: - Update-MgBetaApplication begin processing with parameterSet 'UpdateExpanded'.
DEBUG: [Authentication]: - AuthType: 'Delegated', TokenCredentialType: 'InteractiveBrowser', ContextScope: 'CurrentUser', AppName: 'Microsoft Graph Command Line Tools'.
DEBUG: [Authentication]: - Scopes: [Application.Read.All, Application.ReadWrite.All, AuditLog.Read.All, CrossTenantInformation.ReadBasic.All, Directory.Read.All, Group.Read.All, Group.ReadWrite.All, GroupMember.Read.All, openid, Organization.Read.All, profile, RoleEligibilitySchedule.Read.Directory, RoleEligibilitySchedule.ReadWrite.Directory, RoleManagement.Read.All, RoleManagement.Read.Directory, RoleManagement.ReadWrite.Directory, User.Read, User.Read.All, email].

DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
PATCH

Absolute Uri:
https://graph.microsoft.com/beta/applications/REDACTED

Headers:
User-Agent : PowerShell/7.5.4,EntraPowershell/1.0.13,Set-EntraBetaApplication
FeatureFlag : 00000043
Cache-Control : no-store, no-cache
Accept-Encoding : gzip
SdkVersion : graph-powershell-beta/2.25.0
client-request-id : 7f0a458d-443f-44a4-96bd-345239760dd

Body:
{}

Module Version

ModuleType Version Name
Script 1.0.13 Microsoft.Entra.Beta.Applications
Script 1.0.13 Microsoft.Entra.Beta.Authentication

Environment Data

Name Value
PSVersion 7.5.4
PSEdition Core
GitCommitId 7.5.4
OS Darwin 25.1.0 Darwin Kernel Version 25.1.0: Mon Oct 20 19:34:05 PDT 2025; root:xnu-12377.41.6~2/RELEASE_ARM64_T6041
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0

Screenshots

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions