Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to redeploy solution #45

Closed
SammyC80 opened this issue Jan 14, 2022 · 3 comments
Closed

Unable to redeploy solution #45

SammyC80 opened this issue Jan 14, 2022 · 3 comments

Comments

@SammyC80
Copy link

Hello,

First of all thank you for this solution, it's great, however I needed to remove it and redeploy it and the deployment fails. I have tried redeploying this on 2 tenants now (different subscriptions completely) and get the same issue.

I get bad requests on 3 of the functions as follows:

{
"status": "Failed",
"error": {
"code": "BadRequest",
"message": "Scope can not be updated"
}
}

After this I deleted the entire resource group I was deploying to and tried again to a new resource group, it got further but still failed, this time with:

"status": "Failed",
"error": {
    "code": "RoleAssignmentUpdateNotPermitted",
    "message": "Tenant ID, application ID, principal ID, and scope are not allowed to be updated."

Although this time all resources seemed to be deployed, when attempting to start a VM it failed with:

{
"Message": "An error has occurred.",
"ExceptionMessage": "The client 'xxx' with object id 'xxx' does not have authorization to perform action 'Microsoft.Resources/subscriptions/resources/read' over scope '/subscriptions/xxx' or the scope is invalid. If access was recently granted, please refresh your credentials.",
"ExceptionType": "Microsoft.Rest.Azure.CloudException",

Please help, I am not doing anything differently to when I initially deployed it to either tenant, it just isn't redeploying, is there some role or something I need to remove prior to redeploying?

Many thanks in advance!

@svarga-msft
Copy link
Contributor

svarga-msft commented Jan 14, 2022

From the error it sounds like the managed identity used by start stop is not getting deployed correctly. Is it possible that the subscription permissions have been updated recently?

You should see your function apps managed identity under the subscriptions access control like this:
image

Let me know if you see it and we can go from there.

@SammyC80
Copy link
Author

SammyC80 commented Jan 17, 2022 via email

@svarga-msft
Copy link
Contributor

Great to hear your issue was resolved. We haven't experienced this with our test deployments, but we will update our documentation to mention this for other users.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants