Download Plugin Registration Tool using PowerShell – Dynamics 365 CE

Hi Everyone,

Here are the steps to download Dynamics 365 CE Plugin Registration Tool via PowerShell.

1) Type Windows Powershell in windows start menu and open it.
2) Navigate to the folder where you would like download the tool.


3) Copy and paste the following PowerShell script into the PowerShell window and press Enter.

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$sourceNugetExe = "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe"
$targetNugetExe = ".\nuget.exe"
Remove-Item .\Tools -Force -Recurse -ErrorAction Ignore
Invoke-WebRequest $sourceNugetExe -OutFile $targetNugetExe
Set-Alias nuget $targetNugetExe -Scope Global -Verbose

##
##Download Plugin Registration Tool
##
./nuget install Microsoft.CrmSdk.XrmTooling.PluginRegistrationTool -O .\Tools
md .\Tools\PluginRegistration
$prtFolder = Get-ChildItem ./Tools | Where-Object {$_.Name -match 'Microsoft.CrmSdk.XrmTooling.PluginRegistrationTool.'}
move .\Tools\$prtFolder\tools\*.* .\Tools\PluginRegistration
Remove-Item .\Tools\$prtFolder -Force -Recurse


4) You will see the Tool at the given path.

Hope this helps.


Happy 365’ing
Gopinath.

Using the Plugin Registration tool with MFA-enabled accounts in Dynamics 365

Hi Everyone,

Today, I was working on some plugins and there is multi factor authentication enabled on the user account which I was using and I was not sure about the process that has to be followed to login. However, after search I did find the solution for the same. 

When you hit the Login button in Plugin Registration Tool with Username, Password and multi factor authentication enabled, the login fails shows the below message.

 

 

 


You don’t have permission to access any of the organizations in the Microsoft Common Data Service region that you specified. If you’re not sure which region your organization resides in, choose “Don’t know” for the CDS region and try again. Otherwise check with your CDS administrator.

To resolve the issue, you must not enter your username and password in the login window and when you click Login, you will taken to Microsoft Log-in screen as normal and asks you to enter username and password followed by MFA.


Hope this helps.

Happy 365’ing
Gopinath