Skip to content

🪲 Module Microsoft.Entra.Beta.Applications can not be loaded in version 1.2.0 #1595

@wintec01

Description

@wintec01

Describe the bug

I am trying to install the Microsoft MCP Server for Enterprise based on https://learn.microsoft.com/en-us/graph/mcp-server/get-started?tabs=http%2Cvscode and the registration is failing

To Reproduce

Steps to reproduce the behavior:

  1. Execute Grant-EntraBetaMCPServerPermission -ApplicationName VisualStudioCode
  2. See error
Grant-EntraBetaMCPServerPermission : The 'Grant-EntraBetaMCPServerPermission' command was found in the module 'Microsoft.Entra.Beta.Applications', but the module could not be loaded. For more information, run 'Import-Module Microsoft.Entra.Beta.Applications'.
At line:1 char:1
+ Grant-EntraBetaMCPServerPermission -ApplicationName VisualStudioCode
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Grant-EntraBetaMCPServerPermission:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CouldNotAutoloadMatchingModule
  1. Execute Import-Module Microsoft.Entra.Beta.Applications
  2. See error
At C:\Program Files\WindowsPowerShell\Modules\Microsoft.Entra.Beta.Applications\1.2.0\Microsoft.Entra.Beta.Applications.psm1:4270 char:45
+ function Invoke-EntraBetaAgentIdInteractive {
+                                             ~
Missing closing '}' in statement block or type definition.
At C:\Program Files\WindowsPowerShell\Modules\Microsoft.Entra.Beta.Applications\1.2.0\Microsoft.Entra.Beta.Applications.psm1:4718 char:5
+     }
+     ~
Unexpected token '}' in expression or statement.
At C:\Program Files\WindowsPowerShell\Modules\Microsoft.Entra.Beta.Applications\1.2.0\Microsoft.Entra.Beta.Applications.psm1:4719 char:1
+ }
+ ~
Unexpected token '}' in expression or statement.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : MissingEndCurlyBrace

Import-Module : The module to process 'Microsoft.Entra.Beta.Applications.psm1', listed in field 'ModuleToProcess/RootModule' of module manifest 'C:\Program
Files\WindowsPowerShell\Modules\Microsoft.Entra.Beta.Applications\1.2.0\Microsoft.Entra.Beta.Applications.psd1' was not processed because no valid module was found in any module directory.
At line:1 char:1
+ Import-Module Microsoft.Entra.Beta.Applications
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ResourceUnavailable: (Microsoft.Entra.Beta.Applications:String) [Import-Module], PSInvalidOperationException
    + FullyQualifiedErrorId : Modules_ModuleFileNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand

Expected behavior

Module should be loaded without any error

Debug Output

Module Version

1.2.0

get-module Microsoft.Entra.Beta* -ListAvailable


    Directory: C:\Program Files\WindowsPowerShell\Modules


ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Script     1.2.0      Microsoft.Entra.Beta                {Enable-EntraAzureADAlias, Get-EntraUnsupportedCommand, Test-EntraScript}
Script     1.2.0      Microsoft.Entra.Beta.Applications   {Add-EntraBetaApplicationOwner, Add-EntraBetaApplicationPolicy, Add-EntraBetaClientSecretToAgentIdentityBlueprint, Add-EntraBetaInheritablePermissionsToAgentIdentityBlueprint...}
Script     1.2.0      Microsoft.Entra.Beta.Authentication {Connect-Entra, Disconnect-Entra, Get-EntraContext, Get-EntraEnvironment...}
Script     1.2.0      Microsoft.Entra.Beta.DirectoryMa... {Add-EntraBetaAdministrativeUnitMember, Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue, Add-EntraBetaDeviceRegisteredOwner, Add-EntraBetaDeviceRegisteredUser...}
Script     1.2.0      Microsoft.Entra.Beta.Governance     {Get-EntraBetaDirectoryRoleAssignment, Get-EntraBetaDirectoryRoleDefinition, Get-EntraBetaPrivilegedResource, Get-EntraBetaPrivilegedRole...}
Script     1.2.0      Microsoft.Entra.Beta.Groups         {Add-EntraBetaGroupMember, Add-EntraBetaGroupOwner, Add-EntraBetaLifecyclePolicyGroup, Get-EntraBetaDeletedGroup...}
Script     1.2.0      Microsoft.Entra.Beta.NetworkAccess  {Enable-EntraBetaGlobalSecureAccessTenant, Get-EntraBetaGlobalSecureAccessTenantStatus, Get-EntraBetaPrivateAccessApplication, Get-EntraBetaPrivateAccessApplicationSegment...}
Script     1.2.0      Microsoft.Entra.Beta.Reports        {Get-EntraBetaApplicationSignInDetailedSummary, Get-EntraBetaApplicationSignInSummary, Get-EntraBetaAuditDirectoryLog, Get-EntraBetaAuditSignInLog...}
Script     1.2.0      Microsoft.Entra.Beta.SignIns        {Add-EntraBetaFeatureRolloutPolicyDirectoryObject, Add-EntraBetaServicePrincipalPolicy, Get-EntraBetaAuthorizationPolicy, Get-EntraBetaConditionalAccessPolicy...}
Script     1.2.0      Microsoft.Entra.Beta.Users          {Get-EntraBetaDeletedUser, Get-EntraBetaInactiveSignInUser, Get-EntraBetaUser, Get-EntraBetaUserAdministrativeUnit...}

Environment Data

$PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.17763.8510
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.17763.8510
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Screenshots

Image

Additional context

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions