Microsoft.Xrm.Data.PowerShell icon indicating copy to clipboard operation
Microsoft.Xrm.Data.PowerShell copied to clipboard

Use -ForceOAuth - update example text

Open 2ATCaroline opened this issue 3 years ago • 4 comments

You want to update the example as WS-trust authentication is deprecated to:

(Online - use oAuth and XrmTooling Ui by providing your UPN and the enviroment url) connect-crmonline -Username "[email protected]" -ServerUrl .crm.dynamics.com -ForceOAuth

2ATCaroline avatar Apr 06 '22 15:04 2ATCaroline

Hi @2ATCaroline thanks for the suggestion! I was under the impression the XRM Tooling powershell connector library would default to oAuth but it looks like that might not be the case. I was thinking as an alternative we could ship an update that defaults to ForceOAuth for connect-CrmOnline.

seanmcne avatar Apr 06 '22 20:04 seanmcne

Hi @seanmcne, Even better! Or both (for now) :)

2ATCaroline avatar Apr 07 '22 09:04 2ATCaroline

Its coming, next drop of the lib will do it automatically. We are pending a few updates for new GEO’s

Thanks

MattB-msft avatar Apr 07 '22 17:04 MattB-msft

@MattB-msft - is there a graceful way now (in the latest update) to have the module attempt using oAuth and fallback to WS-Trust if it fails? Right now we're using a connectionstring to ensure consistent behavior of the connector but defaulting to WS-Trust. Can we change this to have a "try oAuth and fallback" or is this something we should attempt to handle within the module?

Thanks!

seanmcne avatar Jul 27 '22 13:07 seanmcne