Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

[Bug] GetOrganizations is missing from the generated Dataverse service with Power Apps SDK 1.1.1 / CLI 1.0.1

Abierto
#462 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
typescript
Área
tooling

Línea de trabajo

Comienza con la ruta de generación de pa app add data-source y el diagnóstico AddDataSource.InternalActionsFiltered; después, inspecciona src/generated/services/MicrosoftDataverseService.ts y los metadatos del conector que contienen GetOrganizations. Reproduce el método que falta con la llamada de TypeScript documentada. Se considera terminado cuando el servicio generado conserva la operación, o cuando se proporciona un reemplazo compatible documentado y una guía de migración.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

bug

Summary

After generating the Microsoft Dataverse connector with pa app add data-source,
MicrosoftDataverseService.GetOrganizations() is no longer available.

An existing code app's previously generated Dataverse service includes this
operation, and the app uses it to retrieve accessible Dataverse organizations
and their friendly names. Generating the connector for a new code app with the
versions below omits the method and causes the existing application code to
fail compilation.

The observed issue is in the generated connector service, not a missing
top-level export from the SDK.

Why this method is important

GetOrganizations is particularly useful for resolving details of the
currently selected environment using the Dataverse connector already connected
to the app.
It returns accessible organizations, allowing the app to identify
the selected environment and obtain its friendly name and organization URL.
It is a discovery operation; the application performs the selected-environment
matching.

This supports an important user experience: showing a recognizable environment
name instead of a GUID, so users can confirm which environment they are working
in. It also supports environment-aware pickers without hardcoding environment
names or introducing a separate connector just to retrieve this metadata.

Please preserve this capability, or provide a supported replacement before
removing access to the method.
Existing applications depend on it, and a
replacement should support retrieving the selected environment's details, not
only its identifier.

Environment

  • @microsoft/power-apps: 1.1.1
  • @microsoft/power-apps-cli: 1.0.1
  • @microsoft/power-apps-vite: 1.0.2
  • Node.js: 24.19.0
  • Operating system: Windows
  • Connector: shared_commondataserviceforapps
  • Exact CLI version that originally generated the working method: not recorded.

Steps to reproduce

  1. Create a React/TypeScript Power Apps code app with the versions above.

  2. Initialize it and add an existing Microsoft Dataverse connection:

    pa app init --display-name "Dataverse reproduction" --environment-id <environment-id>
    pa app add data-source --connector shared_commondataserviceforapps --connection-id <connection-id> --org-url https://<organization>.crm.dynamics.com
    
  3. Inspect src/generated/services/MicrosoftDataverseService.ts.

  4. Attempt to compile the following application code:

    import { MicrosoftDataverseService } from './generated/services/MicrosoftDataverseService';
    
    const result = await MicrosoftDataverseService.GetOrganizations();
    

Expected behavior

The generated service retains GetOrganizations, or the tooling provides a
documented, supported replacement and migration guidance for applications
already using this operation.

Actual behavior

The generated service does not contain GetOrganizations. TypeScript reports:

TS2339: Property 'GetOrganizations' does not exist on type 'typeof MicrosoftDataverseService'.

Relevant diagnostic evidence

The connector-generation log reports:

AddDataSource.InternalActionsFiltered
totalActions: 93
internalCount: 56
internalOperationIds includes: GetOrganizations

This suggests the operation is being excluded by the CLI's internal-action
filter. Please confirm whether this exclusion is intentional or a regression.
The diagnostic numbers above are from the connector metadata returned during
this reproduction.

Impact and current workaround

Existing applications that use GetOrganizations for environment discovery or
friendly environment names cannot compile against the newly generated service.

For the current environment's display name, our workaround is to read
getContext().app.environmentId, add the separate Power Apps for Makers
connector, and match that ID against the results of
PowerAppsforMakersService.Get_Environments().

getContext() supplies the environment ID and Dataverse organization URL, but
does not expose the friendly environment name. The workaround therefore adds
another connector solely for a lookup previously handled through Dataverse.
It is not necessarily a complete replacement for all GetOrganizations use
cases.

We have not manually modified generated files to restore the operation.

Requested guidance and future alternative

If GetOrganizations will remain unavailable in generated services, please
clarify:

  1. What is the recommended, supported alternative for retrieving the selected
    environment's friendly name and organization details in a Power Apps code app?
  2. Can this be done through the existing Dataverse connector or the Power Apps
    SDK context, without adding another connector? Could getContext() expose
    the environment's friendly display name alongside environmentId and
    dataverseOrgUrl?
  3. Is Power Apps for Makers Get_Environments() the recommended long-term
    replacement, and what differences in permissions, licensing, or DLP
    requirements should applications account for?
  4. Please provide a working code sample, the minimum supported SDK/CLI versions,
    and migration guidance so applications can continue to resolve the selected
    environment if this method is not available in future releases.
Lenguaje dominante
TypeScript
Estrellas
504
Forks
145
Merge medio
4 h 3 min
PR fusionados (30 d)
1

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de microsoft/PowerAppsCodeApps

Todos los issues de microsoft/PowerAppsCodeApps

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.