You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Maybe it is allready answered somewhere, but this far i didn't find it. Maye I am just stubborn and it cannot be achieved at the moment using the connect-pnponline command...
What I am trying to achieve is to run a pnp script in en Azure Automation Runbook with an Azure Automation Account which has both 'Run as' as well as just activated Managed Identity. When I created Run as was pretty much the only option, but now Managed Identity seems the most secure way to go.
With the script I stored in the Runbook I want to provision Team sites from scratch, so I need to connect at the tenant level tenant-admin.sharepoint.com that I know. However when I try the method using client ID and client secret it doesn't work, saying I need an access token.
What is the best code to connect to pnp-online? I have a registered app in place using the Register-PnPManagementShellAccess but that works only for connect-pnponline with -userweblogin or -interactive.
Would greatly appreciate any pointers to the right direction. Preferably an example or code snippet but anything will do :-)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Maybe it is allready answered somewhere, but this far i didn't find it. Maye I am just stubborn and it cannot be achieved at the moment using the connect-pnponline command...
What I am trying to achieve is to run a pnp script in en Azure Automation Runbook with an Azure Automation Account which has both 'Run as' as well as just activated Managed Identity. When I created Run as was pretty much the only option, but now Managed Identity seems the most secure way to go.
With the script I stored in the Runbook I want to provision Team sites from scratch, so I need to connect at the tenant level tenant-admin.sharepoint.com that I know. However when I try the method using client ID and client secret it doesn't work, saying I need an access token.
What is the best code to connect to pnp-online? I have a registered app in place using the Register-PnPManagementShellAccess but that works only for connect-pnponline with -userweblogin or -interactive.
Would greatly appreciate any pointers to the right direction. Preferably an example or code snippet but anything will do :-)
Thank you in advance!
Beta Was this translation helpful? Give feedback.
All reactions