WaelHamze / dyn365-ce-vsts-tasks

VSTS Extension for Dynamics 365 Customer Engagement
https://marketplace.visualstudio.com/items?itemName=WaelHamze.xrm-ci-framework-build-tasks
GNU General Public License v3.0
117 stars 56 forks source link

Does GetOnlineInstanceByName support for Client Secret? #144

Open filcole opened 4 years ago

filcole commented 4 years ago

When using Client Id / Client Secret Authentication in the username and password fields of the "MSCRM Get Online Instance By Name" task (v10.*) the task is failing with message:

TenantId is required when using Client Id / Client Secret Authentication

I'm unsure where this error message is being returned from. Is this supported? Thanks

WaelHamze commented 4 years ago

There isn't much documentation on what -Credential currently supports. I have only used it with username/password.

But browsing through the APIs I can see this: https://docs.microsoft.com/en-us/powershell/module/microsoft.xrm.onlinemanagementapi/enable-crmmanagementapp?view=pa-ps-latest

Have you tried calling this API with a username/password and passing the clientid that you want to use for further calls?