Skip to content

.\scripts\Verify-Role-Assignments.ps1 script fails with multiple errors #74

@Menghua1

Description

@Menghua1

Describe:
When running the command .\scripts\Verify-Role-Assignments.ps1 to verify role assignments, the script first reports that the deployment-info.json file cannot be found (see screenshot).
Image

After specifying the path as prompted, running .\scripts\Assign-Role-To-Current-User.ps1 -DeploymentInfoPath scripts\deployment-info.json results in the error: A value is required for property 'appId' of resource 'ServicePrincipal'.
Image

Upon checking the script, it was found that the fields entraAppSpObjectId and entraAppClientId in the script do not match ENTRA_APP_SP_OBJECT_ID and ENTRA_APP_CLIENT_ID in deployment-info.json.

Repro Steps:

  1. Run git clone https://github.com/AzureCosmosDB/MCPToolKit.git and cd MCPToolKit.
  2. Deploy Infrastructure via Azure Developer CLI (azd up).
  3. Run .\scripts\Deploy-Cosmos-MCP-Toolkit.ps1 -ResourceGroup "YOUR-RESOURCE-GROUP" -EntraAppName "My Custom MCP App".
  4. Run .\scripts\Verify-Role-Assignments.ps1.

Environment:

  • OS: Windows
  • Azd version: azd version 1.21.3 (commit b01891fc63b1faf9a9633cdc630deab0b4d569c4).

Expected behavior:
.\scripts\Verify-Role-Assignments.ps1 runs successfully.

@sajeetharan and @hemarina for notification.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions