[Bug] GetOrganizations is missing from the generated Dataverse service with Power Apps SDK 1.1.1 / CLI 1.0.1
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- tooling
Direzione di ricerca
Inizia con il percorso di generazione di pa app add data-source e la diagnostica AddDataSource.InternalActionsFiltered, quindi esamina src/generated/services/MicrosoftDataverseService.ts e i metadati del connettore che contengono GetOrganizations. Riproduci il metodo mancante con la chiamata TypeScript documentata. Il lavoro è completato quando il servizio generato conserva l'operazione, oppure quando vengono forniti un sostituto supportato e documentato e le indicazioni per la migrazione.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
-
Create a React/TypeScript Power Apps code app with the versions above.
-
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 -
Inspect
src/generated/services/MicrosoftDataverseService.ts. -
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:
- What is the recommended, supported alternative for retrieving the selected
environment's friendly name and organization details in a Power Apps code app? - Can this be done through the existing Dataverse connector or the Power Apps
SDK context, without adding another connector? CouldgetContext()expose
the environment's friendly display name alongsideenvironmentIdand
dataverseOrgUrl? - 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? - 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.
- Lingua principale
- TypeScript
- Stelle
- 504
- Fork
- 145
- Merge medio
- 4h 3m
- PR unite (30g)
- 1
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di microsoft/PowerAppsCodeApps
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
microsoft/PowerAppsCodeApps#465 ·
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
microsoft/PowerAppsCodeApps#463 ·
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
microsoft/PowerAppsCodeApps#461 ·
-
bug
Difficoltà 5/5 Più di una settimana Idoneità per principianti 28/100
microsoft/PowerAppsCodeApps#460 · 2 commenti ·
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
microsoft/PowerAppsCodeApps#459 ·
Tutte le issue di microsoft/PowerAppsCodeApps
Issue simili
-
VerificationGate: ATTRIBUTION quote guard never matches a normal quotation (\b around the quote) Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
danielmiessler/LifeOS#2234 ·
-
T: Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
-
Mend: dependency security vulnerability untriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100