Is there a way to use Add-PnPUserToGroup command to add a AD Security Group into a SharePoint group on SharePoint Online?
I'm writing a script which does some post-some creation tasks and just after a way to do this without writing lines and lines of code. I saw one-liner examples of adding security groups as site collection admins, but haven't found a way to add this to a SP Group.
When I try Add-PnPUserToGroup -LoginName
parameter I get an:
Add-PnPUserToGroup : The object is used in the context different from the one associated with the object.
Error so I think I may be doing something daft there!
I would really appreciate help on this.
Thank you