-
Notifications
You must be signed in to change notification settings - Fork 240
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
[Bug] "--area is not present in current organization" error during "az devops invoke --area Security" execution #1011
Comments
Also getting this trying to register a web hook:
Result: --area is not present in current organization |
I'm having the same issue too. Any update on this? |
I see that command has two step process first step : it proceeds with particular url for resource within that area. That will be like I see that for the first request area name "Security" is not present and thus the logic fails citing that "Security" is not present in available areas. I am not sure why this API https://dev.azure.com/yourorg/_apis/ResourceAreas will not return full list of Areas which is provided by you can verify this my running below command to check that when all areas are scanned separately, we do get "Security" as available area. az devops invoke --organization "https://dev.azure.com/yourorg" --query "[?contains(area,'Security')]" @narula0781 can we connect with API team for this bug? |
So I ran into this issue, and "fixed" it locally, but could use some guidance on how to properly implement the fix in this repo. So first, I don't code in python very often so I probably shouldn't be writing the fix. There's two bugs here causing this behavior:
if not client_url:
for resource_area in resource_areas:
if resource_area.name.lower() == 'core':
client_url = resource_area.location_url So, all the parts to fix this should be here. With a little guidance on this I could make a PR with a VERY basic fix, but I won't have the time to contribute any tests for this. With the above fixes in place, I'm able to call this with the correct API resource and area: az devops invoke \
--organization "https://dev.azure.com/yourorg" \
--area "Security" \
--resource "SecurityNamespaces" \
--api-version 6.1.1 I got the appropriate endpoint version from the {
"area": "Security",
"id": "ce7b9f95-fde9-4be8-a86d-83b366f0b87a",
"maxVersion": 6.1,
"minVersion": 1.0,
"releasedVersion": "6.0",
"resourceName": "SecurityNamespaces",
"resourceVersion": 1,
"routeTemplate": "_apis/{resource}/{securityNamespaceId}"
} |
Any update on this? Also getting the same error when trying to invoke the securityroles area (to update/set permissions on an environment). |
Getting this error when trying to use --area Contribution. Any update? |
Also hit by this error for |
@rhatfield-bushel this like I am getting this error on --area processes. I did your fix of updating the invoke.py file and it resolved the issue. Hopefully one day this will get merged in. |
@gauravsaralMs Can you please look into this. |
Also hit by this error for --scope securityroles |
Issue still exists |
Currently having the same issue with the following: Command
Response
|
sskoklev: Fix as suggested in Azure#1011 (comment).
any updates? |
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Azure Cli Version: 2.70
Azure-Devops extension version: 0.18.0
Steps to reproduce the behavior:
run:
az devops invoke --organization "https://dev.azure.com/myorg" --area "Security" --resource "SecurityNamespaces"
and see error:
--area is not present in current organization
Expected behavior
Results the same as using GET rest call:
https://dev.azure.com/myorg/_apis/securitynamespaces?api-version=5.1
Debug logs
cli.azure.cli.core.util : --area is not present in current organization
--area is not present in current organization
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: