Skip to content

Cannot read properties of undefined (reading 'allowedTenants') #2874

Description

@shailugit

Important

PLEASE DO NOT CREATE ISSUES RELATED TO MANAGED DEVELOPER PORTAL IN THIS REPOSITORY. Issues related to "Managed developer portal" will be closed automatically. Managed developer portal issues should be created directly in Azure Support + Troubleshooting in Azure portal. Contact Azure support (or) submit a post on Stack Overflow. Feature requests can be raised on the Azure Feedback Forum.

Every self-hosted developer bug report should have precise description and reproduction steps; console traces (or) source code references are appreciated.

Bug description

Issue with publishing the selfhsoted website

Reproduction steps

  1. Simply follow the document https://learn.microsoft.com/en-us/azure/api-management/developer-portal-self-host
  2. Run npm run publish to publish the website locally
  3. See error below
    Error: Unable to complete publishing. Error: Unable to complete pages publishing. Error: Unable to publish page "Sign in": Error: Unable to render page "Sign in - Microsoft Azure API Management - developer portal": Error: Unable to render page: TypeError: Cannot read properties of undefined (reading 'allowedTenants')
  4. Content not published correctly under dist/website folder.

Expected behavior

Run npm run should be able to Publish the portal locally and the content is published to the dist/website folder.

Is self-hosted portal?

Yes

Warning

"Managed developer portal issues" will be closed automatically. See above for more details.

Release tag or commit SHA (if using self-hosted version)

Release 2.34

API Management service name

apim-one-shailesh

Environment

  • Operating system: [e.g., iOS]
  • Browser: [e.g., Google Chrome, Safari]
  • Version: [e.g., 22]

Additional context

Issue seems with allowedTenants variable under signinSocialViewModelBinder.ts file
Fix add the null check here > const tenants = aadIdentityProvider?.allowedTenants || [];

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    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