Access exception when Azure WebJob runs The Next CEO of Stack OverflowCannot access Azure VM endpointAzure Template Fails when deployedcannot deploy web app from github to azureWhen to use storage queue on Azure?Install SQL Server 2017 on Windows 10 Azure VMException of type “System.OutOfMemoryException” deploying database to AzureException of type “System.OutOfMemoryException” importing BacPac into AzureAzure Information Protection Scanner deployment - error acquiring tokenLets Encrypt - Server Error in '/letsencrypt' Application, A Task was CancelledAn attempt was made to access a socket in a way forbidden by its access permissions:127.0.0.1:44300

What exact does MIB represent in SNMP? How is it different from OID?

What flight has the highest ratio of time difference to flight time?

If a black hole is created from light, can this black hole then move at speed of light?

Can you replace a racial trait cantrip when leveling up?

How did the Bene Gesserit know how to make a Kwisatz Haderach?

If Nick Fury and Coulson already knew about aliens (Kree and Skrull) why did they wait until Thor's appearance to start making weapons?

How to avoid supervisors with prejudiced views?

Bold, vivid family

Why does standard notation not preserve intervals (visually)

Which tube will fit a -(700 x 25c) wheel?

What does convergence in distribution "in the Gromov–Hausdorff" sense mean?

In excess I'm lethal

Several mode to write the symbol of a vector

Does it take more energy to get to Venus or to Mars?

Real integral using residue theorem - why doesn't this work?

Unreliable Magic - Is it worth it?

Is there a difference between "Fahrstuhl" and "Aufzug"

Why do professional authors make "consistency" mistakes? And how to avoid them?

Example of a Mathematician/Physicist whose Other Publications during their PhD eclipsed their PhD Thesis

Are there any unintended negative consequences to allowing PCs to gain multiple levels at once in a short milestone-XP game?

How do I go from 300 unfinished/half written blog posts, to published posts?

Is it professional to write unrelated content in an almost-empty email?

Can I run my washing machine drain line into a condensate pump so it drains better?

How to start emacs in "nothing" mode (`fundamental-mode`)



Access exception when Azure WebJob runs



The Next CEO of Stack OverflowCannot access Azure VM endpointAzure Template Fails when deployedcannot deploy web app from github to azureWhen to use storage queue on Azure?Install SQL Server 2017 on Windows 10 Azure VMException of type “System.OutOfMemoryException” deploying database to AzureException of type “System.OutOfMemoryException” importing BacPac into AzureAzure Information Protection Scanner deployment - error acquiring tokenLets Encrypt - Server Error in '/letsencrypt' Application, A Task was CancelledAn attempt was made to access a socket in a way forbidden by its access permissions:127.0.0.1:44300










0















I'm getting an error when a webjob runs:




Microsoft.Azure.WebJobs.Host.FunctionInvocationException: Exception while executing function: Functions.Cleanup ---> Microsoft.Rest.Azure.CloudException: The client '[Redacted]' with object id '[Redacted]' does not have authorization to perform action 'Microsoft.Web/sites/config/list/action' over scope '/subscriptions/[Redacted]/resourceGroups/[Redacted]/providers/Microsoft.Web/sites/[Redacted]/config/publishingcredentials'.




This is a LetsEncrypt certificate renewal attempt; the full stack report is below.



I've reviewed documentation here and here, but I'm afraid I'm still at a loss.



I've found the Microsoft.Web/sites/config/list/action provider here, but it's not listed in the available roles and there's no indication as to how to give it access to this:



/subscriptions/[Redacted]/resourceGroups/[Redacted]/providers/Microsoft.Web/sites/[Redacted]/config/publishingcredentials



All has been working well for the past year, but this only started failing within the past month or so. I have two websites on which I'm running the job, and suddenly both are failing with like errors.



It could be related to my recent decision to move the extension's files out of AppData into a folder one level above the website, as discussed here, but due to timing issues I can't be certain.



How can I add the necessary permissions to let the WebJob run successfully?



 1 
2 "Type": "FunctionCompleted",
3 "EndTime": "2019-03-21T03:11:53.1829332+00:00",
4 "Failure":
5 "ExceptionType": "Microsoft.Azure.WebJobs.Host.FunctionInvocationException",
6 "ExceptionDetails": "Microsoft.Azure.WebJobs.Host.FunctionInvocationException: Exception while executing function: Functions.Cleanup ---> Microsoft.Rest.Azure.CloudException: The client '[Redacted]' with object id '[Redacted]' does not have authorization to perform action 'Microsoft.Web/sites/config/list/action' over scope '/subscriptions/[Redacted]/resourceGroups/[Redacted]/providers/Microsoft.Web/sites/[Redacted]/config/publishingcredentials'.
7 at Microsoft.Azure.Management.WebSites.WebAppsOperations.<BeginListPublishingCredentialsWithHttpMessagesAsync>d__210.MoveNext()
8 --- End of stack trace from previous location where exception was thrown ---
9 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
10 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
11 at Microsoft.Azure.Management.WebSites.WebAppsOperationsExtensions.<BeginListPublishingCredentialsAsync>d__411.MoveNext()
12 --- End of stack trace from previous location where exception was thrown ---
13 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
14 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
15 at Microsoft.Azure.Management.WebSites.WebAppsOperationsExtensions.BeginListPublishingCredentials(IWebAppsOperations operations, String resourceGroupName, String name)
16 at LetsEncrypt.Azure.Core.KuduHelper.GetKuduClient(WebSiteManagementClient client, IAzureWebAppEnvironment settings) in D:\a\1\s\LetsEncrypt.SiteExtension.Core\KuduHelper.cs:line 15
17 at LetsEncrypt.Azure.Core.Services.KuduFileSystemAuthorizationChallengeProvider..ctor(IAzureWebAppEnvironment azureEnvironment, IAuthorizationChallengeProviderConfig config) in D:\a\1\s\LetsEncrypt.SiteExtension.Core\Services\KuduFileSystemAuthorizationChallengeProvider.cs:line 22
18 at LetsEncrypt.Azure.Core.CertificateManager..ctor(AppSettingsAuthConfig config) in D:\a\1\s\LetsEncrypt.SiteExtension.Core\CertificateManager.cs:line 31
19 at LetsEncrypt.SiteExtension.Functions.Cleanup(TimerInfo timerInfo) in D:\a\1\s\LetsEncrypt.SiteExtension.WebJob\Functions.cs:line 73
20 at lambda_method(Closure , Functions , Object[] )
21 at Microsoft.Azure.WebJobs.Host.Executors.VoidMethodInvoker`1.InvokeAsync(TReflected instance, Object[] arguments)
22 at Microsoft.Azure.WebJobs.Host.Executors.FunctionInvoker`1.<InvokeAsync>d__8.MoveNext()
23 --- End of stack trace from previous location where exception was thrown ---
24 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
25 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
26 at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.<InvokeAsync>d__22.MoveNext()
27 --- End of stack trace from previous location where exception was thrown ---
28 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
29 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
30 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
31 at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.<ExecuteWithWatchersAsync>d__21.MoveNext()
32 --- End of stack trace from previous location where exception was thrown ---
33 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
34 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
35 at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.<ExecuteWithLoggingAsync>d__19.MoveNext()
36 --- End of stack trace from previous location where exception was thrown ---
37 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
38 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
39 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
40 at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.<ExecuteWithLoggingAsync>d__13.MoveNext()
41 --- End of inner exception stack trace ---
42 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
43 at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.<ExecuteWithLoggingAsync>d__13.MoveNext()
44 --- End of stack trace from previous location where exception was thrown ---
45 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
46 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
47 at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.<TryExecuteAsync>d__10.MoveNext()"
48 ,
49 "ParameterLogs": ,
50 "FunctionInstanceId": "[Redacted]",
51 "Function":
52 "Id": "LetsEncrypt.SiteExtension.Functions.Cleanup",
53 "FullName": "LetsEncrypt.SiteExtension.Functions.Cleanup",
54 "ShortName": "Functions.Cleanup",
55 "Parameters": [
56
57 "Name": "timerInfo",
58 "DisplayHints":
59 "Description": "Timer executed on schedule (Daily: 1 occurrences)"
60
61
62 ]
63 ,
64 "Arguments":
65 "timerInfo": "2019-03-21T03:11:49.9071967+00:00"
66 ,
67 "Reason": "AutomaticTrigger",
68 "ReasonDetails": "Timer fired at 2019-03-21T03:11:48.8550732+00:00",
69 "StartTime": "2019-03-21T03:11:48.8550732+00:00",
70 "OutputBlob":
71 "ContainerName": "azure-webjobs-hosts",
72 "BlobName": "output-logs/[Redacted].txt"
73 ,
74 "ParameterLogBlob":
75 "ContainerName": "azure-webjobs-hosts",
76 "BlobName": "output-logs/[Redacted].params.txt"
77 ,
78 "HostInstanceId": "[Redacted]",
79 "HostDisplayName": "LetsEncrypt.SiteExtension.WebJob",
80 "SharedQueueName": "azure-webjobs-host-le-[Redacted]",
81 "InstanceQueueName": "azure-webjobs-host-[Redacted]",
82 "Heartbeat":
83 "SharedContainerName": "azure-webjobs-hosts",
84 "SharedDirectoryName": "heartbeats/le-[Redacted]",
85 "InstanceBlobName": "[Redacted]",
86 "ExpirationInSeconds": 45
87 ,
88 "WebJobRunIdentifier":
89 "WebSiteName": "[Redacted]",
90 "JobType": "Continuous",
91 "JobName": "letsencrypt.siteextension.job",
92 "RunId": ""
93
94









share|improve this question


























    0















    I'm getting an error when a webjob runs:




    Microsoft.Azure.WebJobs.Host.FunctionInvocationException: Exception while executing function: Functions.Cleanup ---> Microsoft.Rest.Azure.CloudException: The client '[Redacted]' with object id '[Redacted]' does not have authorization to perform action 'Microsoft.Web/sites/config/list/action' over scope '/subscriptions/[Redacted]/resourceGroups/[Redacted]/providers/Microsoft.Web/sites/[Redacted]/config/publishingcredentials'.




    This is a LetsEncrypt certificate renewal attempt; the full stack report is below.



    I've reviewed documentation here and here, but I'm afraid I'm still at a loss.



    I've found the Microsoft.Web/sites/config/list/action provider here, but it's not listed in the available roles and there's no indication as to how to give it access to this:



    /subscriptions/[Redacted]/resourceGroups/[Redacted]/providers/Microsoft.Web/sites/[Redacted]/config/publishingcredentials



    All has been working well for the past year, but this only started failing within the past month or so. I have two websites on which I'm running the job, and suddenly both are failing with like errors.



    It could be related to my recent decision to move the extension's files out of AppData into a folder one level above the website, as discussed here, but due to timing issues I can't be certain.



    How can I add the necessary permissions to let the WebJob run successfully?



     1 
    2 "Type": "FunctionCompleted",
    3 "EndTime": "2019-03-21T03:11:53.1829332+00:00",
    4 "Failure":
    5 "ExceptionType": "Microsoft.Azure.WebJobs.Host.FunctionInvocationException",
    6 "ExceptionDetails": "Microsoft.Azure.WebJobs.Host.FunctionInvocationException: Exception while executing function: Functions.Cleanup ---> Microsoft.Rest.Azure.CloudException: The client '[Redacted]' with object id '[Redacted]' does not have authorization to perform action 'Microsoft.Web/sites/config/list/action' over scope '/subscriptions/[Redacted]/resourceGroups/[Redacted]/providers/Microsoft.Web/sites/[Redacted]/config/publishingcredentials'.
    7 at Microsoft.Azure.Management.WebSites.WebAppsOperations.<BeginListPublishingCredentialsWithHttpMessagesAsync>d__210.MoveNext()
    8 --- End of stack trace from previous location where exception was thrown ---
    9 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    10 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    11 at Microsoft.Azure.Management.WebSites.WebAppsOperationsExtensions.<BeginListPublishingCredentialsAsync>d__411.MoveNext()
    12 --- End of stack trace from previous location where exception was thrown ---
    13 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    14 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    15 at Microsoft.Azure.Management.WebSites.WebAppsOperationsExtensions.BeginListPublishingCredentials(IWebAppsOperations operations, String resourceGroupName, String name)
    16 at LetsEncrypt.Azure.Core.KuduHelper.GetKuduClient(WebSiteManagementClient client, IAzureWebAppEnvironment settings) in D:\a\1\s\LetsEncrypt.SiteExtension.Core\KuduHelper.cs:line 15
    17 at LetsEncrypt.Azure.Core.Services.KuduFileSystemAuthorizationChallengeProvider..ctor(IAzureWebAppEnvironment azureEnvironment, IAuthorizationChallengeProviderConfig config) in D:\a\1\s\LetsEncrypt.SiteExtension.Core\Services\KuduFileSystemAuthorizationChallengeProvider.cs:line 22
    18 at LetsEncrypt.Azure.Core.CertificateManager..ctor(AppSettingsAuthConfig config) in D:\a\1\s\LetsEncrypt.SiteExtension.Core\CertificateManager.cs:line 31
    19 at LetsEncrypt.SiteExtension.Functions.Cleanup(TimerInfo timerInfo) in D:\a\1\s\LetsEncrypt.SiteExtension.WebJob\Functions.cs:line 73
    20 at lambda_method(Closure , Functions , Object[] )
    21 at Microsoft.Azure.WebJobs.Host.Executors.VoidMethodInvoker`1.InvokeAsync(TReflected instance, Object[] arguments)
    22 at Microsoft.Azure.WebJobs.Host.Executors.FunctionInvoker`1.<InvokeAsync>d__8.MoveNext()
    23 --- End of stack trace from previous location where exception was thrown ---
    24 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    25 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    26 at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.<InvokeAsync>d__22.MoveNext()
    27 --- End of stack trace from previous location where exception was thrown ---
    28 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    29 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    30 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
    31 at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.<ExecuteWithWatchersAsync>d__21.MoveNext()
    32 --- End of stack trace from previous location where exception was thrown ---
    33 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    34 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    35 at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.<ExecuteWithLoggingAsync>d__19.MoveNext()
    36 --- End of stack trace from previous location where exception was thrown ---
    37 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    38 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    39 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
    40 at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.<ExecuteWithLoggingAsync>d__13.MoveNext()
    41 --- End of inner exception stack trace ---
    42 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
    43 at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.<ExecuteWithLoggingAsync>d__13.MoveNext()
    44 --- End of stack trace from previous location where exception was thrown ---
    45 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    46 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    47 at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.<TryExecuteAsync>d__10.MoveNext()"
    48 ,
    49 "ParameterLogs": ,
    50 "FunctionInstanceId": "[Redacted]",
    51 "Function":
    52 "Id": "LetsEncrypt.SiteExtension.Functions.Cleanup",
    53 "FullName": "LetsEncrypt.SiteExtension.Functions.Cleanup",
    54 "ShortName": "Functions.Cleanup",
    55 "Parameters": [
    56
    57 "Name": "timerInfo",
    58 "DisplayHints":
    59 "Description": "Timer executed on schedule (Daily: 1 occurrences)"
    60
    61
    62 ]
    63 ,
    64 "Arguments":
    65 "timerInfo": "2019-03-21T03:11:49.9071967+00:00"
    66 ,
    67 "Reason": "AutomaticTrigger",
    68 "ReasonDetails": "Timer fired at 2019-03-21T03:11:48.8550732+00:00",
    69 "StartTime": "2019-03-21T03:11:48.8550732+00:00",
    70 "OutputBlob":
    71 "ContainerName": "azure-webjobs-hosts",
    72 "BlobName": "output-logs/[Redacted].txt"
    73 ,
    74 "ParameterLogBlob":
    75 "ContainerName": "azure-webjobs-hosts",
    76 "BlobName": "output-logs/[Redacted].params.txt"
    77 ,
    78 "HostInstanceId": "[Redacted]",
    79 "HostDisplayName": "LetsEncrypt.SiteExtension.WebJob",
    80 "SharedQueueName": "azure-webjobs-host-le-[Redacted]",
    81 "InstanceQueueName": "azure-webjobs-host-[Redacted]",
    82 "Heartbeat":
    83 "SharedContainerName": "azure-webjobs-hosts",
    84 "SharedDirectoryName": "heartbeats/le-[Redacted]",
    85 "InstanceBlobName": "[Redacted]",
    86 "ExpirationInSeconds": 45
    87 ,
    88 "WebJobRunIdentifier":
    89 "WebSiteName": "[Redacted]",
    90 "JobType": "Continuous",
    91 "JobName": "letsencrypt.siteextension.job",
    92 "RunId": ""
    93
    94









    share|improve this question
























      0












      0








      0








      I'm getting an error when a webjob runs:




      Microsoft.Azure.WebJobs.Host.FunctionInvocationException: Exception while executing function: Functions.Cleanup ---> Microsoft.Rest.Azure.CloudException: The client '[Redacted]' with object id '[Redacted]' does not have authorization to perform action 'Microsoft.Web/sites/config/list/action' over scope '/subscriptions/[Redacted]/resourceGroups/[Redacted]/providers/Microsoft.Web/sites/[Redacted]/config/publishingcredentials'.




      This is a LetsEncrypt certificate renewal attempt; the full stack report is below.



      I've reviewed documentation here and here, but I'm afraid I'm still at a loss.



      I've found the Microsoft.Web/sites/config/list/action provider here, but it's not listed in the available roles and there's no indication as to how to give it access to this:



      /subscriptions/[Redacted]/resourceGroups/[Redacted]/providers/Microsoft.Web/sites/[Redacted]/config/publishingcredentials



      All has been working well for the past year, but this only started failing within the past month or so. I have two websites on which I'm running the job, and suddenly both are failing with like errors.



      It could be related to my recent decision to move the extension's files out of AppData into a folder one level above the website, as discussed here, but due to timing issues I can't be certain.



      How can I add the necessary permissions to let the WebJob run successfully?



       1 
      2 "Type": "FunctionCompleted",
      3 "EndTime": "2019-03-21T03:11:53.1829332+00:00",
      4 "Failure":
      5 "ExceptionType": "Microsoft.Azure.WebJobs.Host.FunctionInvocationException",
      6 "ExceptionDetails": "Microsoft.Azure.WebJobs.Host.FunctionInvocationException: Exception while executing function: Functions.Cleanup ---> Microsoft.Rest.Azure.CloudException: The client '[Redacted]' with object id '[Redacted]' does not have authorization to perform action 'Microsoft.Web/sites/config/list/action' over scope '/subscriptions/[Redacted]/resourceGroups/[Redacted]/providers/Microsoft.Web/sites/[Redacted]/config/publishingcredentials'.
      7 at Microsoft.Azure.Management.WebSites.WebAppsOperations.<BeginListPublishingCredentialsWithHttpMessagesAsync>d__210.MoveNext()
      8 --- End of stack trace from previous location where exception was thrown ---
      9 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
      10 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      11 at Microsoft.Azure.Management.WebSites.WebAppsOperationsExtensions.<BeginListPublishingCredentialsAsync>d__411.MoveNext()
      12 --- End of stack trace from previous location where exception was thrown ---
      13 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
      14 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      15 at Microsoft.Azure.Management.WebSites.WebAppsOperationsExtensions.BeginListPublishingCredentials(IWebAppsOperations operations, String resourceGroupName, String name)
      16 at LetsEncrypt.Azure.Core.KuduHelper.GetKuduClient(WebSiteManagementClient client, IAzureWebAppEnvironment settings) in D:\a\1\s\LetsEncrypt.SiteExtension.Core\KuduHelper.cs:line 15
      17 at LetsEncrypt.Azure.Core.Services.KuduFileSystemAuthorizationChallengeProvider..ctor(IAzureWebAppEnvironment azureEnvironment, IAuthorizationChallengeProviderConfig config) in D:\a\1\s\LetsEncrypt.SiteExtension.Core\Services\KuduFileSystemAuthorizationChallengeProvider.cs:line 22
      18 at LetsEncrypt.Azure.Core.CertificateManager..ctor(AppSettingsAuthConfig config) in D:\a\1\s\LetsEncrypt.SiteExtension.Core\CertificateManager.cs:line 31
      19 at LetsEncrypt.SiteExtension.Functions.Cleanup(TimerInfo timerInfo) in D:\a\1\s\LetsEncrypt.SiteExtension.WebJob\Functions.cs:line 73
      20 at lambda_method(Closure , Functions , Object[] )
      21 at Microsoft.Azure.WebJobs.Host.Executors.VoidMethodInvoker`1.InvokeAsync(TReflected instance, Object[] arguments)
      22 at Microsoft.Azure.WebJobs.Host.Executors.FunctionInvoker`1.<InvokeAsync>d__8.MoveNext()
      23 --- End of stack trace from previous location where exception was thrown ---
      24 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
      25 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      26 at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.<InvokeAsync>d__22.MoveNext()
      27 --- End of stack trace from previous location where exception was thrown ---
      28 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
      29 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      30 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
      31 at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.<ExecuteWithWatchersAsync>d__21.MoveNext()
      32 --- End of stack trace from previous location where exception was thrown ---
      33 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
      34 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      35 at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.<ExecuteWithLoggingAsync>d__19.MoveNext()
      36 --- End of stack trace from previous location where exception was thrown ---
      37 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
      38 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      39 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
      40 at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.<ExecuteWithLoggingAsync>d__13.MoveNext()
      41 --- End of inner exception stack trace ---
      42 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      43 at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.<ExecuteWithLoggingAsync>d__13.MoveNext()
      44 --- End of stack trace from previous location where exception was thrown ---
      45 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
      46 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      47 at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.<TryExecuteAsync>d__10.MoveNext()"
      48 ,
      49 "ParameterLogs": ,
      50 "FunctionInstanceId": "[Redacted]",
      51 "Function":
      52 "Id": "LetsEncrypt.SiteExtension.Functions.Cleanup",
      53 "FullName": "LetsEncrypt.SiteExtension.Functions.Cleanup",
      54 "ShortName": "Functions.Cleanup",
      55 "Parameters": [
      56
      57 "Name": "timerInfo",
      58 "DisplayHints":
      59 "Description": "Timer executed on schedule (Daily: 1 occurrences)"
      60
      61
      62 ]
      63 ,
      64 "Arguments":
      65 "timerInfo": "2019-03-21T03:11:49.9071967+00:00"
      66 ,
      67 "Reason": "AutomaticTrigger",
      68 "ReasonDetails": "Timer fired at 2019-03-21T03:11:48.8550732+00:00",
      69 "StartTime": "2019-03-21T03:11:48.8550732+00:00",
      70 "OutputBlob":
      71 "ContainerName": "azure-webjobs-hosts",
      72 "BlobName": "output-logs/[Redacted].txt"
      73 ,
      74 "ParameterLogBlob":
      75 "ContainerName": "azure-webjobs-hosts",
      76 "BlobName": "output-logs/[Redacted].params.txt"
      77 ,
      78 "HostInstanceId": "[Redacted]",
      79 "HostDisplayName": "LetsEncrypt.SiteExtension.WebJob",
      80 "SharedQueueName": "azure-webjobs-host-le-[Redacted]",
      81 "InstanceQueueName": "azure-webjobs-host-[Redacted]",
      82 "Heartbeat":
      83 "SharedContainerName": "azure-webjobs-hosts",
      84 "SharedDirectoryName": "heartbeats/le-[Redacted]",
      85 "InstanceBlobName": "[Redacted]",
      86 "ExpirationInSeconds": 45
      87 ,
      88 "WebJobRunIdentifier":
      89 "WebSiteName": "[Redacted]",
      90 "JobType": "Continuous",
      91 "JobName": "letsencrypt.siteextension.job",
      92 "RunId": ""
      93
      94









      share|improve this question














      I'm getting an error when a webjob runs:




      Microsoft.Azure.WebJobs.Host.FunctionInvocationException: Exception while executing function: Functions.Cleanup ---> Microsoft.Rest.Azure.CloudException: The client '[Redacted]' with object id '[Redacted]' does not have authorization to perform action 'Microsoft.Web/sites/config/list/action' over scope '/subscriptions/[Redacted]/resourceGroups/[Redacted]/providers/Microsoft.Web/sites/[Redacted]/config/publishingcredentials'.




      This is a LetsEncrypt certificate renewal attempt; the full stack report is below.



      I've reviewed documentation here and here, but I'm afraid I'm still at a loss.



      I've found the Microsoft.Web/sites/config/list/action provider here, but it's not listed in the available roles and there's no indication as to how to give it access to this:



      /subscriptions/[Redacted]/resourceGroups/[Redacted]/providers/Microsoft.Web/sites/[Redacted]/config/publishingcredentials



      All has been working well for the past year, but this only started failing within the past month or so. I have two websites on which I'm running the job, and suddenly both are failing with like errors.



      It could be related to my recent decision to move the extension's files out of AppData into a folder one level above the website, as discussed here, but due to timing issues I can't be certain.



      How can I add the necessary permissions to let the WebJob run successfully?



       1 
      2 "Type": "FunctionCompleted",
      3 "EndTime": "2019-03-21T03:11:53.1829332+00:00",
      4 "Failure":
      5 "ExceptionType": "Microsoft.Azure.WebJobs.Host.FunctionInvocationException",
      6 "ExceptionDetails": "Microsoft.Azure.WebJobs.Host.FunctionInvocationException: Exception while executing function: Functions.Cleanup ---> Microsoft.Rest.Azure.CloudException: The client '[Redacted]' with object id '[Redacted]' does not have authorization to perform action 'Microsoft.Web/sites/config/list/action' over scope '/subscriptions/[Redacted]/resourceGroups/[Redacted]/providers/Microsoft.Web/sites/[Redacted]/config/publishingcredentials'.
      7 at Microsoft.Azure.Management.WebSites.WebAppsOperations.<BeginListPublishingCredentialsWithHttpMessagesAsync>d__210.MoveNext()
      8 --- End of stack trace from previous location where exception was thrown ---
      9 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
      10 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      11 at Microsoft.Azure.Management.WebSites.WebAppsOperationsExtensions.<BeginListPublishingCredentialsAsync>d__411.MoveNext()
      12 --- End of stack trace from previous location where exception was thrown ---
      13 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
      14 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      15 at Microsoft.Azure.Management.WebSites.WebAppsOperationsExtensions.BeginListPublishingCredentials(IWebAppsOperations operations, String resourceGroupName, String name)
      16 at LetsEncrypt.Azure.Core.KuduHelper.GetKuduClient(WebSiteManagementClient client, IAzureWebAppEnvironment settings) in D:\a\1\s\LetsEncrypt.SiteExtension.Core\KuduHelper.cs:line 15
      17 at LetsEncrypt.Azure.Core.Services.KuduFileSystemAuthorizationChallengeProvider..ctor(IAzureWebAppEnvironment azureEnvironment, IAuthorizationChallengeProviderConfig config) in D:\a\1\s\LetsEncrypt.SiteExtension.Core\Services\KuduFileSystemAuthorizationChallengeProvider.cs:line 22
      18 at LetsEncrypt.Azure.Core.CertificateManager..ctor(AppSettingsAuthConfig config) in D:\a\1\s\LetsEncrypt.SiteExtension.Core\CertificateManager.cs:line 31
      19 at LetsEncrypt.SiteExtension.Functions.Cleanup(TimerInfo timerInfo) in D:\a\1\s\LetsEncrypt.SiteExtension.WebJob\Functions.cs:line 73
      20 at lambda_method(Closure , Functions , Object[] )
      21 at Microsoft.Azure.WebJobs.Host.Executors.VoidMethodInvoker`1.InvokeAsync(TReflected instance, Object[] arguments)
      22 at Microsoft.Azure.WebJobs.Host.Executors.FunctionInvoker`1.<InvokeAsync>d__8.MoveNext()
      23 --- End of stack trace from previous location where exception was thrown ---
      24 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
      25 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      26 at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.<InvokeAsync>d__22.MoveNext()
      27 --- End of stack trace from previous location where exception was thrown ---
      28 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
      29 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      30 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
      31 at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.<ExecuteWithWatchersAsync>d__21.MoveNext()
      32 --- End of stack trace from previous location where exception was thrown ---
      33 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
      34 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      35 at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.<ExecuteWithLoggingAsync>d__19.MoveNext()
      36 --- End of stack trace from previous location where exception was thrown ---
      37 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
      38 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      39 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
      40 at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.<ExecuteWithLoggingAsync>d__13.MoveNext()
      41 --- End of inner exception stack trace ---
      42 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      43 at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.<ExecuteWithLoggingAsync>d__13.MoveNext()
      44 --- End of stack trace from previous location where exception was thrown ---
      45 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
      46 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      47 at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.<TryExecuteAsync>d__10.MoveNext()"
      48 ,
      49 "ParameterLogs": ,
      50 "FunctionInstanceId": "[Redacted]",
      51 "Function":
      52 "Id": "LetsEncrypt.SiteExtension.Functions.Cleanup",
      53 "FullName": "LetsEncrypt.SiteExtension.Functions.Cleanup",
      54 "ShortName": "Functions.Cleanup",
      55 "Parameters": [
      56
      57 "Name": "timerInfo",
      58 "DisplayHints":
      59 "Description": "Timer executed on schedule (Daily: 1 occurrences)"
      60
      61
      62 ]
      63 ,
      64 "Arguments":
      65 "timerInfo": "2019-03-21T03:11:49.9071967+00:00"
      66 ,
      67 "Reason": "AutomaticTrigger",
      68 "ReasonDetails": "Timer fired at 2019-03-21T03:11:48.8550732+00:00",
      69 "StartTime": "2019-03-21T03:11:48.8550732+00:00",
      70 "OutputBlob":
      71 "ContainerName": "azure-webjobs-hosts",
      72 "BlobName": "output-logs/[Redacted].txt"
      73 ,
      74 "ParameterLogBlob":
      75 "ContainerName": "azure-webjobs-hosts",
      76 "BlobName": "output-logs/[Redacted].params.txt"
      77 ,
      78 "HostInstanceId": "[Redacted]",
      79 "HostDisplayName": "LetsEncrypt.SiteExtension.WebJob",
      80 "SharedQueueName": "azure-webjobs-host-le-[Redacted]",
      81 "InstanceQueueName": "azure-webjobs-host-[Redacted]",
      82 "Heartbeat":
      83 "SharedContainerName": "azure-webjobs-hosts",
      84 "SharedDirectoryName": "heartbeats/le-[Redacted]",
      85 "InstanceBlobName": "[Redacted]",
      86 "ExpirationInSeconds": 45
      87 ,
      88 "WebJobRunIdentifier":
      89 "WebSiteName": "[Redacted]",
      90 "JobType": "Continuous",
      91 "JobName": "letsencrypt.siteextension.job",
      92 "RunId": ""
      93
      94






      azure






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 26 at 18:48









      InteXXInteXX

      359425




      359425




















          1 Answer
          1






          active

          oldest

          votes


















          0














          It turned out that I didn't have a security role assigned to the WebJob (link).



          Assign Permissions




          Go to your Resource Group with the web site, click Access Control (IAM) and use the Check Access Feature. If you know the name of your Service Principal/Application you can just search for it and see what permission it has assigned. In my case here it is granted Owner access on the Subscription, but that is more than required. Contributor access on the Resource Group should be sufficient.




          Once I did that, the job was able to run successfully.






          share|improve this answer























            Your Answer








            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "2"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f960105%2faccess-exception-when-azure-webjob-runs%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            It turned out that I didn't have a security role assigned to the WebJob (link).



            Assign Permissions




            Go to your Resource Group with the web site, click Access Control (IAM) and use the Check Access Feature. If you know the name of your Service Principal/Application you can just search for it and see what permission it has assigned. In my case here it is granted Owner access on the Subscription, but that is more than required. Contributor access on the Resource Group should be sufficient.




            Once I did that, the job was able to run successfully.






            share|improve this answer



























              0














              It turned out that I didn't have a security role assigned to the WebJob (link).



              Assign Permissions




              Go to your Resource Group with the web site, click Access Control (IAM) and use the Check Access Feature. If you know the name of your Service Principal/Application you can just search for it and see what permission it has assigned. In my case here it is granted Owner access on the Subscription, but that is more than required. Contributor access on the Resource Group should be sufficient.




              Once I did that, the job was able to run successfully.






              share|improve this answer

























                0












                0








                0







                It turned out that I didn't have a security role assigned to the WebJob (link).



                Assign Permissions




                Go to your Resource Group with the web site, click Access Control (IAM) and use the Check Access Feature. If you know the name of your Service Principal/Application you can just search for it and see what permission it has assigned. In my case here it is granted Owner access on the Subscription, but that is more than required. Contributor access on the Resource Group should be sufficient.




                Once I did that, the job was able to run successfully.






                share|improve this answer













                It turned out that I didn't have a security role assigned to the WebJob (link).



                Assign Permissions




                Go to your Resource Group with the web site, click Access Control (IAM) and use the Check Access Feature. If you know the name of your Service Principal/Application you can just search for it and see what permission it has assigned. In my case here it is granted Owner access on the Subscription, but that is more than required. Contributor access on the Resource Group should be sufficient.




                Once I did that, the job was able to run successfully.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered yesterday









                InteXXInteXX

                359425




                359425



























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Server Fault!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f960105%2faccess-exception-when-azure-webjob-runs%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Club Baloncesto Breogán Índice Historia | Pavillón | Nome | O Breogán na cultura popular | Xogadores | Adestradores | Presidentes | Palmarés | Historial | Líderes | Notas | Véxase tamén | Menú de navegacióncbbreogan.galCadroGuía oficial da ACB 2009-10, páxina 201Guía oficial ACB 1992, páxina 183. Editorial DB.É de 6.500 espectadores sentados axeitándose á última normativa"Estudiantes Junior, entre as mellores canteiras"o orixinalHemeroteca El Mundo Deportivo, 16 setembro de 1970, páxina 12Historia do BreogánAlfredo Pérez, o último canoneiroHistoria C.B. BreogánHemeroteca de El Mundo DeportivoJimmy Wright, norteamericano do Breogán deixará Lugo por ameazas de morteResultados de Breogán en 1986-87Resultados de Breogán en 1990-91Ficha de Velimir Perasović en acb.comResultados de Breogán en 1994-95Breogán arrasa al Barça. "El Mundo Deportivo", 27 de setembro de 1999, páxina 58CB Breogán - FC BarcelonaA FEB invita a participar nunha nova Liga EuropeaCharlie Bell na prensa estatalMáximos anotadores 2005Tempada 2005-06 : Tódolos Xogadores da Xornada""Non quero pensar nunha man negra, mais pregúntome que está a pasar""o orixinalRaúl López, orgulloso dos xogadores, presume da boa saúde económica do BreogánJulio González confirma que cesa como presidente del BreogánHomenaxe a Lisardo GómezA tempada do rexurdimento celesteEntrevista a Lisardo GómezEl COB dinamita el Pazo para forzar el quinto (69-73)Cafés Candelas, patrocinador del CB Breogán"Suso Lázare, novo presidente do Breogán"o orixinalCafés Candelas Breogán firma el mayor triunfo de la historiaEl Breogán realizará 17 homenajes por su cincuenta aniversario"O Breogán honra ao seu fundador e primeiro presidente"o orixinalMiguel Giao recibiu a homenaxe do PazoHomenaxe aos primeiros gladiadores celestesO home que nos amosa como ver o Breo co corazónTita Franco será homenaxeada polos #50anosdeBreoJulio Vila recibirá unha homenaxe in memoriam polos #50anosdeBreo"O Breogán homenaxeará aos seus aboados máis veteráns"Pechada ovación a «Capi» Sanmartín e Ricardo «Corazón de González»Homenaxe por décadas de informaciónPaco García volve ao Pazo con motivo do 50 aniversario"Resultados y clasificaciones""O Cafés Candelas Breogán, campión da Copa Princesa""O Cafés Candelas Breogán, equipo ACB"C.B. Breogán"Proxecto social"o orixinal"Centros asociados"o orixinalFicha en imdb.comMario Camus trata la recuperación del amor en 'La vieja música', su última película"Páxina web oficial""Club Baloncesto Breogán""C. B. Breogán S.A.D."eehttp://www.fegaba.com

                    Vilaño, A Laracha Índice Patrimonio | Lugares e parroquias | Véxase tamén | Menú de navegación43°14′52″N 8°36′03″O / 43.24775, -8.60070

                    Cegueira Índice Epidemioloxía | Deficiencia visual | Tipos de cegueira | Principais causas de cegueira | Tratamento | Técnicas de adaptación e axudas | Vida dos cegos | Primeiros auxilios | Crenzas respecto das persoas cegas | Crenzas das persoas cegas | O neno deficiente visual | Aspectos psicolóxicos da cegueira | Notas | Véxase tamén | Menú de navegación54.054.154.436928256blindnessDicionario da Real Academia GalegaPortal das Palabras"International Standards: Visual Standards — Aspects and Ranges of Vision Loss with Emphasis on Population Surveys.""Visual impairment and blindness""Presentan un plan para previr a cegueira"o orixinalACCDV Associació Catalana de Cecs i Disminuïts Visuals - PMFTrachoma"Effect of gene therapy on visual function in Leber's congenital amaurosis"1844137110.1056/NEJMoa0802268Cans guía - os mellores amigos dos cegosArquivadoEscola de cans guía para cegos en Mortágua, PortugalArquivado"Tecnología para ciegos y deficientes visuales. Recopilación de recursos gratuitos en la Red""Colorino""‘COL.diesis’, escuchar los sonidos del color""COL.diesis: Transforming Colour into Melody and Implementing the Result in a Colour Sensor Device"o orixinal"Sistema de desarrollo de sinestesia color-sonido para invidentes utilizando un protocolo de audio""Enseñanza táctil - geometría y color. Juegos didácticos para niños ciegos y videntes""Sistema Constanz"L'ocupació laboral dels cecs a l'Estat espanyol està pràcticament equiparada a la de les persones amb visió, entrevista amb Pedro ZuritaONCE (Organización Nacional de Cegos de España)Prevención da cegueiraDescrición de deficiencias visuais (Disc@pnet)Braillín, un boneco atractivo para calquera neno, con ou sen discapacidade, que permite familiarizarse co sistema de escritura e lectura brailleAxudas Técnicas36838ID00897494007150-90057129528256DOID:1432HP:0000618D001766C10.597.751.941.162C97109C0155020