AADSTS7000218 error when trying to use Connect-PNPOnline with DeviceLogin option after new EntraID registration #4322
-
We created a new EntraID App after the deprecation of the global app and have given all the required permissions. When trying to login using the -DeviceLogin option that we have been using earlier, we now get an error message indicating that the request body requires the client_assertion or client_secret parameters. The documentation does not suggest that we need this for interactive login, and the error appears to come after the auth sequence is done (getting prompted for authentication from the device login page etc.,) We cannot use the -interactive approach in our environment and have been depending on the -DeviceLogin approach for a while now... Has anyone been able to leverage -DeviceLogin after the change from the global app successfully? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 7 replies
-
@Somu76 - most likely this should fix it. Toggling this Allow public client flows to yes. |
Beta Was this translation helpful? Give feedback.
-
Thanks @gautamdsheth ... tried the same earlier and got it fixed but forgot to update here... This appears to be something that needs to be updated in the Documentation so others do not run into the same. either here: https://pnp.github.io/powershell/articles/registerapplication.html OR Thanks, |
Beta Was this translation helpful? Give feedback.
-
@gautamdsheth Hi, we receive the same error and were able to fix it with the toggle you metioned. Other blogposts for the same AAD error (like this) also mention the option to add the RedirectUri "http://localhost" for a Mobile or Desktop application under "Authentication" in the app registration. We were not able to make this work with Connect-PnPOnline but this would help us a lot as we do not allow public client flows... Please let us know whether there is any way to make this work with a RedirectUri PNP uses internally? Thank you very much! |
Beta Was this translation helpful? Give feedback.
@Somu76 - most likely this should fix it. Toggling this Allow public client flows to yes.
https://learn.microsoft.com/en-us/answers/questions/1377450/how-to-fix-the-issue-im-getting-this-error-a-confi