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

Resource provider not registred automatically for Microsoft.Security/pricings #19900

Closed
ms-henglu opened this issue Jan 31, 2023 · 2 comments · Fixed by #20860
Closed

Resource provider not registred automatically for Microsoft.Security/pricings #19900

ms-henglu opened this issue Jan 31, 2023 · 2 comments · Fixed by #20860
Labels
Mgmt This issue is related to a management-plane library. Security Service Attention Workflow: This issue is responsible by Azure service team. Service This issue points to a problem in the service.

Comments

@ms-henglu
Copy link
Member

With track2 sdk, creating of a Microsoft.Security/pricings@2022-03-01 resource is failing to a newly created subscription without a registered Microsoft.Security provider.

│ PUT https://management.azure.com/subscriptions/[subscription-id]/providers/Microsoft.Security/pricings/VirtualMachines?api-version=2022-03-01
│ --------------------------------------------------------------------------------
│ RESPONSE 404: 404 Not Found
│ ERROR CODE: Subscription Not Registered
│ --------------------------------------------------------------------------------
│ {
│   "error": {
│     "code": "Subscription Not Registered",
│     "message": "Please register to Microsoft.Security in order to view your security status"
│   }
│ }
│ --------------------------------------------------------------------------------
│ 
│ 
╵

This might be caused by the fact that the automatic resource registration is checking for the error code MissingSubscriptionRegistration but the API is returning Subscription Not Registered

const unregisteredRPCode = "MissingSubscriptionRegistration"

@ghost ghost added the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Jan 31, 2023
@jhendrixMSFT jhendrixMSFT added Security Service Attention Workflow: This issue is responsible by Azure service team. Mgmt This issue is related to a management-plane library. Service This issue points to a problem in the service. and removed needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. labels Jan 31, 2023
@ghost
Copy link

ghost commented Jan 31, 2023

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @chlahav.

Issue Details

With track2 sdk, creating of a Microsoft.Security/pricings@2022-03-01 resource is failing to a newly created subscription without a registered Microsoft.Security provider.

│ PUT https://management.azure.com/subscriptions/[subscription-id]/providers/Microsoft.Security/pricings/VirtualMachines?api-version=2022-03-01
│ --------------------------------------------------------------------------------
│ RESPONSE 404: 404 Not Found
│ ERROR CODE: Subscription Not Registered
│ --------------------------------------------------------------------------------
│ {
│   "error": {
│     "code": "Subscription Not Registered",
│     "message": "Please register to Microsoft.Security in order to view your security status"
│   }
│ }
│ --------------------------------------------------------------------------------
│ 
│ 
╵

This might be caused by the fact that the automatic resource registration is checking for the error code MissingSubscriptionRegistration but the API is returning Subscription Not Registered

const unregisteredRPCode = "MissingSubscriptionRegistration"

Author: ms-henglu
Assignees: -
Labels:

Security, Service Attention, Mgmt, Service

Milestone: -

@tadelesh
Copy link
Member

tadelesh commented Feb 3, 2023

@eliagrady I wonder if the error is returned from ARM or your service which is not consistent with the guide. Could you help to take a look?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Mgmt This issue is related to a management-plane library. Security Service Attention Workflow: This issue is responsible by Azure service team. Service This issue points to a problem in the service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants