Skip to content

Commit b5abd5a

Browse files
Merge pull request #231 from Power-Maverick/main
Release v2.2.4
2 parents 798cd2a + 1f29604 commit b5abd5a

File tree

8 files changed

+199
-54
lines changed

8 files changed

+199
-54
lines changed

CHANGELOG.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
99

10-
## [v2.2.3](https://github.com/Power-Maverick/DataverseDevTools-VSCode/compare/v2.2.2...v2.2.3)
10+
## [v2.2.4](https://github.com/Power-Maverick/DataverseDevTools-VSCode/compare/v2.2.3...v2.2.4)
1111

1212
### Merged
1313

14+
- Login enabled using Dataverse Dev Client Id [`#230`](https://github.com/Power-Maverick/DataverseDevTools-VSCode/pull/230)
15+
16+
## [v2.2.3](https://github.com/Power-Maverick/DataverseDevTools-VSCode/compare/v2.2.2...v2.2.3) - 2025-03-14
17+
18+
### Merged
19+
20+
- Release v2.2.3 [`#229`](https://github.com/Power-Maverick/DataverseDevTools-VSCode/pull/229)
1421
- Added entity attribute metadata for enabling more features with typings [`#228`](https://github.com/Power-Maverick/DataverseDevTools-VSCode/pull/228)
1522

23+
### Commits
24+
25+
- Docs: Add @uofirob as a contributor [`61b0edd`](https://github.com/Power-Maverick/DataverseDevTools-VSCode/commit/61b0edd8fdb714c872711e58f94028c6934d69a5)
26+
- Bump version to 2.2.3 and merge entity attribute [`621ea2e`](https://github.com/Power-Maverick/DataverseDevTools-VSCode/commit/621ea2eb986bb360920b576bbd0ca6470315648d)
27+
- Docs: Update @uofirob as a contributor [`2464a03`](https://github.com/Power-Maverick/DataverseDevTools-VSCode/commit/2464a035dda9aa7e28495466be12b8c6a1befbd8)
28+
1629
## [v2.2.2](https://github.com/Power-Maverick/DataverseDevTools-VSCode/compare/v2.2.1...v2.2.2) - 2024-12-16
1730

1831
### Merged

README.md

Lines changed: 58 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<img src="https://github.com/Power-Maverick/DataverseDevTools-VSCode/actions/workflows/build.yml/badge.svg?branch=main"/>
1616
</a>
1717
<a href="https://github.com/Power-Maverick/DataverseDevTools-VSCode/actions/workflows/release.yml" alt="Release">
18-
<img src="https://github.com/Power-Maverick/DataverseDevTools-VSCode/actions/workflows/release.yml/badge.svg?branch=main"/>
18+
<img src="https://github.com/Power-Maverick/DataverseDevTools-VSCode/actions/workflows/release.yml/badge.svg?branch=release"/>
1919
</a>
2020
<a href="https://github.com/Power-Maverick/DataverseDevTools-VSCode/blob/master/LICENSE" alt="License">
2121
<img src="https://img.shields.io/github/license/Power-Maverick/DataverseDevTools-VSCode"/>
@@ -55,43 +55,46 @@
5555
5656
**Table of contents**
5757

58-
- [⚙ Features](#-features)
59-
- [Connect to your Dataverse environment](#connect-to-your-dataverse-environment)
60-
- [Remembers the connected environment per workspace](#remembers-the-connected-environment-per-workspace)
61-
- [See connection and entity details (with copy feature)](#see-connection-and-entity-details-with-copy-feature)
62-
- [Initialize TypeScript project \& add TS File](#initialize-typescript-project--add-ts-file)
63-
- [Generate Typings](#generate-typings)
64-
- [Intellisense for type generated](#intellisense-for-type-generated)
65-
- [Upload Web Resources](#upload-web-resources)
66-
- [Filter by solution](#filter-by-solution)
67-
- [Entities](#entities)
68-
- [Web Resources](#web-resources)
69-
- [Smart Match Web Resources](#smart-match-web-resources)
70-
- [⚒️ Tools](#️-tools)
71-
- [🔥 Using Typings](#-using-typings)
72-
- [🎮 Power Platform CLI Commands](#-power-platform-cli-commands)
73-
- [⌨ Keyboard Shortcuts](#-keyboard-shortcuts)
74-
- [🎁 Early-Access Preview](#-early-access-preview)
75-
- [🧪 Alpha-Testing](#-alpha-testing)
76-
- [⌚ Features available for alpha-test](#-features-available-for-alpha-test)
77-
- [💭 Planned Features](#-planned-features)
78-
- [✨ Contributing](#-contributing)
79-
- [🔉 Discussions](#-discussions)
80-
- [📃 License](#-license)
81-
- [✍ Credits](#-credits)
58+
- [⚙ Features](#-features)
59+
- [Connect to your Dataverse environment](#connect-to-your-dataverse-environment)
60+
- [Remembers the connected environment per workspace](#remembers-the-connected-environment-per-workspace)
61+
- [See connection and entity details (with copy feature)](#see-connection-and-entity-details-with-copy-feature)
62+
- [Initialize TypeScript project \& add TS File](#initialize-typescript-project--add-ts-file)
63+
- [Generate Typings](#generate-typings)
64+
- [Intellisense for type generated](#intellisense-for-type-generated)
65+
- [Upload Web Resources](#upload-web-resources)
66+
- [Filter by solution](#filter-by-solution)
67+
- [Entities](#entities)
68+
- [Web Resources](#web-resources)
69+
- [Smart Match Web Resources](#smart-match-web-resources)
70+
- [⚒️ Tools](#️-tools)
71+
- [🔥 Using Typings](#-using-typings)
72+
- [Generate Typing](#generate-typing)
73+
- [When working with Xrm object from @types/xrm](#when-working-with-xrm-object-from-typesxrm)
74+
- [When working with entity and attributes only](#when-working-with-entity-and-attributes-only)
75+
- [🎮 Power Platform CLI Commands](#-power-platform-cli-commands)
76+
- [⌨ Keyboard Shortcuts](#-keyboard-shortcuts)
77+
- [🎁 Early-Access Preview](#-early-access-preview)
78+
- [🧪 Alpha-Testing](#-alpha-testing)
79+
- [⌚ Features available for alpha-test](#-features-available-for-alpha-test)
80+
- [💭 Planned Features](#-planned-features)
81+
- [✨ Contributing](#-contributing)
82+
- [🔉 Discussions](#-discussions)
83+
- [📃 License](#-license)
84+
- [✍ Credits](#-credits)
8285

8386
## ⚙ Features
8487

8588
### Connect to your Dataverse environment
8689

8790
There are 3 ways you can connect to your Dataverse Environment.
8891

89-
| Connection Type | Description |
90-
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
91-
| Username & Password | This works with environments without MFA-enabled and needs no extra configuration. |
92-
| Microsoft Login Prompt | Uses DVDT's Public App registered in Azure AD. This will need approval from Azure Admin before you can use it for authentication. This connection other than approving the public Azure AD app (which is a one-time activity) needs no extra configuration. This connection will work with MFA-enabled authentication as well. |
93-
| Client Id & Secret | This works with MFA-enabled authentication but needs extra configuration of Azure AD App Registration. To know more on app registration process [read here](https://docs.microsoft.com/en-us/powerapps/developer/data-platform/walkthrough-register-app-azure-active-directory?WT.mc_id=BA-MVP-5003877). |
94-
| Azure | If you are already logged in inside VSCode using Az extension, Azure CLI or Azure PowerShell, you can leverage Azure Identity Framework to get authenticated against Dataverse. The developer has to use the same account for both Azure and Power Platform for this work (thanks to [Natraj Yegnaraman](https://github.com/rajyraman) for this method). This is a single-click authentication method with no prompts. |
92+
| Connection Type | Description |
93+
| ------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
94+
| Microsoft Login Prompt (Recommended) | Uses Microsoft Dev App Id. This connection will work with MFA-enabled authentication as well. |
95+
| Username & Password | This works with environments without MFA-enabled and needs no extra configuration. |
96+
| Client Id & Secret | This works with MFA-enabled authentication but needs extra configuration of Azure AD App Registration. To know more on app registration process [read here](https://docs.microsoft.com/en-us/powerapps/developer/data-platform/walkthrough-register-app-azure-active-directory?WT.mc_id=BA-MVP-5003877). |
97+
| Azure | If you are already logged in inside VSCode using Az extension, Azure CLI or Azure PowerShell, you can leverage Azure Identity Framework to get authenticated against Dataverse. The developer has to use the same account for both Azure and Power Platform for this work (thanks to [Natraj Yegnaraman](https://github.com/rajyraman) for this method). This is a single-click authentication method with no prompts. |
9598

9699
Below is one of the way you can create the connection.
97100

@@ -171,10 +174,15 @@ You can launch your favorite Power Platform tools right from VSCode. Below are t
171174

172175
## 🔥 Using Typings
173176

177+
## Generate Typing
178+
174179
1. Go to **Dataverse DevTools** from the _Activity Side Bar_.
175180
2. From the list of entities, right-click the entity for which you want to create a typing and choose `Generate Typings` option. You can also filter the list of entities by clicking the filter button on the Entities panel as shown [here](#filter-by-solution).
176-
3. Create a onLoad function in your TypeScript file with parameter as `executionContext: Xrm.Events.EventContext`.
177-
4. Initialize your `FormContext` global variable casting it with `Xrm.<entity name>`.
181+
182+
### When working with Xrm object from @types/xrm
183+
184+
1. Create a onLoad function in your TypeScript file with parameter as `executionContext: Xrm.Events.EventContext`.
185+
2. Initialize your `FormContext` global variable casting it with `Xrm.<entity name>`.
178186

179187
For example:
180188
If you wanted to use _Accounts_ entity typings in your TypeScript file then after the typings are generated the code in your TypeScript file will look as shown below:
@@ -188,6 +196,23 @@ export function onLoad(executionContext: Xrm.Events.EventContext) {
188196

189197
In the above code snippet, `Xrm.Account` is a typing generated by Dataverse DevTools to provide intellisense specific to the **Account** entity.
190198

199+
### When working with entity and attributes only
200+
201+
1. Just use by typings the entity name
202+
203+
For example:
204+
If you wanted to use _Accounts_ entity typings in your TypeScript file then after the typings are generated the code in your TypeScript file will look as shown below:
205+
206+
```TypeScript
207+
let fetchAccount =
208+
`<fetch>
209+
<entity name="${Account.EntityLogicalName}">
210+
<attribute name="${Account.Attribute.accountid}" />
211+
<attribute name="${Account.Attribute.telephone1}" />
212+
</entity>
213+
</fetch>`;
214+
```
215+
191216
## 🎮 Power Platform CLI Commands
192217

193218
All the Power Platform CLI commands are easily categorized in a tree format that enables you to execute them with a button-click. If any command needs a parameter then system will intelligently prompt for the input from you. At this time only **required** parameters will be prompted by the system. Please see it in action below:

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "dataverse-devtools",
33
"displayName": "Dataverse DevTools",
4-
"version": "2.2.3",
4+
"version": "2.2.4",
55
"description": "The all-in-one tool to develop code for Dataverse/Dynamics 365. Helps you connect to a Dataverse environment, generate TypeScript definitions for entities, create different type of Dataverse-specific projects and much more.",
66
"publisher": "danish-naglekar",
77
"author": {

src/helpers/dataverseHelper.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as vscode from "vscode";
22
import { ProgressLocation } from "vscode";
33
import { updateConnectionStatusBar } from "../commands/registerCommands";
4-
import { loginWithClientIdSecret, loginWithPrompt, loginWithRefreshToken, loginWithUsernamePassword } from "../login/login";
4+
import { loginWithClientIdSecret, loginWithMicrosoftPrompt, loginWithRefreshToken, loginWithUsernamePassword } from "../login/login";
55
import { DataverseConnectionTreeItem } from "../trees/dataverseConnectionDataProvider";
66
import {
77
LoginTypes,
@@ -409,7 +409,7 @@ export class DataverseHelper {
409409
tokenResponse = await loginWithClientIdSecret(currentConnection.environmentUrl, currentConnection.userName!, currentConnection.password!, currentConnection.tenantId!);
410410
break;
411411
case LoginTypes.microsoftLogin:
412-
tokenResponse = await loginWithPrompt(customDataverseClientId, false, currentConnection.environmentUrl, openUri, redirectTimeout);
412+
tokenResponse = await loginWithMicrosoftPrompt(currentConnection.environmentUrl, openUri, redirectTimeout);
413413
break;
414414
// case LoginTypes.azure:
415415
// tokenResponse = await loginWithAzure(currentConnection.environmentUrl);
@@ -527,8 +527,9 @@ export class DataverseHelper {
527527
// case LoginTypes.azure:
528528
// return await loginWithAzure(conn.environmentUrl);
529529
case LoginTypes.microsoftLogin:
530+
return await loginWithMicrosoftPrompt(conn.environmentUrl, openUri, redirectTimeout);
530531
default:
531-
return await loginWithPrompt(customDataverseClientId, false, conn.environmentUrl, openUri, redirectTimeout);
532+
throw new Error(ErrorMessages.invalidLoginType);
532533
}
533534
}
534535

0 commit comments

Comments
 (0)