Forum Discussion
Failed to automate PowerShell script using service principal for Power BI Security AD group
Hi LainRobertson,
Thanks for the suggestion, i have ran in PowerShell but i am getting below error before running the script i have installed Microsoft.Graph.beta module. Any suggestions will be helpful.
Thanks!
Perhaps check your version of Microsoft.Graph.Authentication as even though I'm two versions behind, I see the ClientSecretCredential parameter from the initial error, and it still features in the documentation:
It's possible you've got an older version, or even multiple versions installed and the one chosen at run time may be the older version. (One old issue I can recall was the x86 path being searched ahead of the x64.)
Anyhow, it's definitely there. That said, I use certificate-based authentication and not client secrets, so it's also possible you might need to tweak the Connect-MgGraph command once you get the initial issue around the unknown parameter resolved.
Cheers,
Lain
- ynr0225Feb 05, 2024Copper Contributor
Hi LainRobertson,
Thanks for the suggestion. After upgrading the Microsoft.graph module, I am able to automate the PowerShell script.
Regards,
Nagendra Y