rezanid / PSDataverse

PowerShell module that brings Dataverse's Web API to PowerShell 7 with features like piping, batching and more.
MIT License
12 stars 2 forks source link

Devicelogin flow can't detect device compliance #42

Closed rvdwegen closed 6 months ago

rvdwegen commented 9 months ago

Hi,

In my organization we require a device to be managed and compliant through Conditional Access before we allow authentication, the devicelogin flow can't detect if that's the case. Probably because its using Webview2 which can't read that information for some reason. https://github.com/MicrosoftEdge/WebView2Feedback/issues/1940 https://github.com/MicrosoftEdge/WebView2Feedback/issues/1878

1111111111111111111Screenshot 2024-02-02 112834

rezanid commented 8 months ago

Thanks for reporting this. I will investigate a bit soon.

rezanid commented 8 months ago

Coming back to you on the issue. I believe this is an issue in the conditional access policy that is blocking you. Perhaps the client id that you are using which is the identifier of Azure PowerShell is not allowed. What you can do is to use the client id of an Application Registration that is approved by your administrator.

The PSDataverse module is not using WebView or any other UI library. That's the whole point of device flow in fact ;) to be able to authenticate from devices that do not necessarily have any display.