runbook
9 TopicsCalling principal does not have required MSGraph permissions AuditLog.Read.All
I have a Runbook (Automation Accounts) parsing AAD SignIn and Audit logs, however, when it executes Get-AzureADAuditSignInLogs I'm getting the following error: Get-AzureADAuditSignInLogs : Error occurred while executing GetAuditSignInLogs Code: Authentication_MSGraphPermissionMissing Message: Calling principal does not have required MSGraph permissions AuditLog.Read.All The Managed Identity I'm using in Runbook has Security Reader role, but it doesn't seem to be enough?Solved18KViews0likes6CommentsAzure runbook is failing to execute due to Authentication issue with azure storage account
Iam facing one issue with authentication of storage account for automation runbook in azure. Scene:- Runbook will runasaccount and its based on service principle. This runbook will get the azurevm status and triggers to store that to storage account every two days. Issue: Runbook execution is successful if I put networking as publicly accessible Runbook is failing to store vm data in storage account if changed networking to selected network. In selected networking, I added resource instance of runbook and allowed trusted azure service, But still it is showing authentication issues. I provided contributor and storage blob data contributor role to the service principle also,still authentication issue. Any idea how to resolve this. Note:I don't want to make storage account publicly accessible.1.5KViews0likes2CommentsEvent Grid for Intune?
Hi! I have an app (TOPdesk) where I am currently trying to integrate with Intune. I have learned that Azure has Event Grids and I can use this to fire off PowerShell Runbooks to execute a PS script which will then send off an HTTP request to connect to my app. The question that came to mind is whether it's possible for Event Grids to listen in to activities from Intune? Basically, I was thinking that whenever a new device is created, the Event Grid can help trigger a runbook to send off a HTTP request to connect to the app. Unfortunately, I have no access to Intune and Event Grid so I cannot confirm this myself. Any insight or alternatives will be appreciated! Thanks!1.2KViews0likes0Comments401 Error using PnP PowerShell in Azure Runbooks
Trying to get PnP PowerShell cmdlets to work within an Azure Runbook with modern authentication (no username/password). I tried registering an Azure AD app and a Service Principal (Run as account) from the automation account that hosts the Runbook. Both use a certificate thumbprint and authorization itself doesn't throw an error. Here's the code I'm using: $connection = Get-AutomationConnection –Name "AzureRunAsConnection" $tenant = '[tenant].onmicrosoft.com' $url = 'https://[tenant].sharepoint.com/sites/test' Connect-PnPOnline -Url $url –Thumbprint $connection.CertificateThumbprint –ClientId $connection.ApplicationID -Tenant $tenant For every PnP cmdlet this throws the following error. Get-PnPTenantSite : The remote server returned an error: (401) Unauthorized. At line:7 char:1 + Get-PnPTenantSite + ~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Get-PnPTenantSite], WebException + FullyQualifiedErrorId : System.Net.WebException,PnP.PowerShell.Commands.GetTenantSite I have also updated the cmdlets from SharePointPnPPowerShellOnline to the newest PnP.PowerShell. Furthermore, the Azure app and service principal are members of the SharePoint administrators group. When I attempt to reproduce the issue on a local machine I get the same 401 error. Any ideas? Thanks!Solved7.5KViews0likes3CommentsConnecting On-Premise AD from Azure Runbook Automation
We have on-premise Active Directory and trying to pull the user details and add the users to this on-premise active directory from the Azure Runbook Automation. Getting attached error. Add-ADGroupMember : Unable to find a default server with Active Directory Web Services running. At line:10 char:5 + Add-ADGroupMember -Identity "SPTeam" -Members "Username" + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ResourceUnavailable: (SPTeam:ADGroup) [Add-ADGroupMember], ADServerDownException + FullyQualifiedErrorId : Unable to find a default server with Active Directory Web Services running.,Microsoft.ActiveDirectory.Management.Commands.AddADGroupMember1.6KViews0likes0CommentsRandom issues with Pnp Powershell in Azure Runbooks
Hi everyone, we're facing random issues when running PnP powershell from Azure runbooks when several instances of the same runbook run concurrently. The scenario We have several of runbooks, they all use PnP Powershell, and each of them perform different actions, such as Enabling site collection app catalog, scripting, external sharing, creating a list etc. Those runbooks get triggered in two different ways: - one is triggered after a new site is created, through a site script, that triggers a logic app and from there we trigger the runbook - the others are triggered via webhook (http post from a function attached to a queue) The issues When the same runbook is triggered more than once at the same time, they fail in different ways: - we see the logs being logged more than once, then the runbooks get suspended - pnp randomly fails, it does not enable the site catalog, or enable scripting, etc - if we put our code inside a try catch block, we use to read weird errors (null reference, invalid connection when using Connect-PnPOnline, etc) Some errors are: Set-PnPTenantSite : Object reference not set to an instance of an object. At line:41 char:9 Connect-PnPOnline : Token request failed. At line:31 char:5 Set-PnPTenantSite : No connection, please connect first with Connect-PnPOnline At line:41 char:9 Add-PnPSiteCollectionAppCatalog : Object reference not set to an instance of an object. Background info: The runbooks were never executed at the same time against the same site. When we trigger them concurrently, we only do it for 10 sites, and the runbooks are pretty simple (connect to the tenant, enable site collection app catalog, and then disconnect) Any ideas? Thanks5.8KViews0likes1Comment