ScoutSuite icon indicating copy to clipboard operation
ScoutSuite copied to clipboard

Azure Error: MissingApiVersionParameter (securitycenter.py)

Open ab-smith opened this issue 3 years ago • 20 comments

Describe the bug

Steps:

  • downloaded the package using pip (or master branch on git)
  • follow the basic steps to start the audit (using account browser since I have MFA)
  • Get this error and scout is just stuck:

ERROR securitycenter.py L86: Failed to retrieve compliance results: Azure Error: MissingApiVersionParameter Message: The api-version query parameter (?api-version=) is required for all requests.

To Reproduce

Please provide:

  • python3 scout.py azure --user-account-browser --tenant xxx-yyy-zzzz

Additional context

Same behaviour using git version or pip version

ab-smith avatar Nov 24 '21 12:11 ab-smith

Sorry if there is a duplicate that I haven't found.

ab-smith avatar Nov 24 '21 12:11 ab-smith

UP: I have same issue.

bartosz-piotrowski-a avatar Dec 03 '21 11:12 bartosz-piotrowski-a

Any quick work around for this?

stephenc01 avatar Dec 06 '21 17:12 stephenc01

Same issue here

nes-jisc avatar Dec 07 '21 11:12 nes-jisc

Same issue

lshw54 avatar Dec 09 '21 16:12 lshw54

Getting the same issue too.

mhomrane avatar Dec 14 '21 15:12 mhomrane

I got around this error by downgrading to azure-cli=2.5.1-1~bionic . I did see the error pop up again in some sections and since this is my first time using this tool I am not sure what it typically looks like.

duckie37 avatar Dec 21 '21 06:12 duckie37

Same issue here. I am stuck with this now. Please provide some workaround atleast for the time being

AbhishekDptr avatar Feb 15 '22 11:02 AbhishekDptr

Any news regarding this issue? The report of security center would be really usefull

DjangoDani avatar Feb 28 '22 12:02 DjangoDani

Same issue here. If you add "--skip securitycenter" to your azure commands, this will keep you running in a degraded state; obviously, missing the security center findings from Azure.

billabongrob avatar Mar 29 '22 19:03 billabongrob

still same issue

LexStar avatar Apr 07 '22 18:04 LexStar

I am also facing this issue.

2022-04-21 10:42:40 XXXXXXX scout[5043] INFO Fetching resources for the App Services service 2022-04-21 10:42:41 XXXXXXX scout[5043] ERROR securitycenter.py L86: Failed to retrieve compliance results: Azure Error: MissingApiVersionParameter Message: The api-version query parameter (?api-version=) is required for all requests.

arunksingh16 avatar Apr 21 '22 09:04 arunksingh16

I am affected as well:

2022-04-26 19:54:23 jan-ThinkPad-T14s scout[42266] ERROR securitycenter.py L86: Failed to retrieve compliance results: Azure Error: MissingApiVersionParameter Message: The api-version query parameter (?api-version=) is required for all requests.

Running on Ubuntu 20.04, fresh git clone from today in a venv with Python 3.8.10

vollkorn1982 avatar Apr 26 '22 17:04 vollkorn1982

Same issue here

jurajsucik avatar Apr 29 '22 09:04 jurajsucik

Same issue here

phillips321 avatar Apr 29 '22 11:04 phillips321

Still present in 5.11. Running on Mac with homebrew python and seperate venv dedicated for scout. Besides patch do we have conclusion what is core issue here ? Is the error within azure-cli or scout itself? Shouldn't scout handle the error itself better ?

bzogala avatar May 21 '22 14:05 bzogala

I believe azure their endpoint and requires to send the api version in the request. IMO scout needs to have this requirement incorporated.

Thank You, Stephen C -All of my email addresses go to the same place -Save Paper, think before you print

On Sat, May 21 2022 at 9:30 AM, bzogala < @.*** > wrote:

Still present in 5.11. Running on Mac with homebrew python and seperate venv dedicated for scout. Besides patch do we have conclusion what is core issue here ? Is the error within azure-cli or scout itself? Shouldn't scout handle it better ?

— Reply to this email directly, view it on GitHub ( https://github.com/nccgroup/ScoutSuite/issues/1385#issuecomment-1133643851 ) , or unsubscribe ( https://github.com/notifications/unsubscribe-auth/ABD32Z7L6BQWR7WKG5AVG6TVLDXQNANCNFSM5IWAC7NA ). You are receiving this because you are subscribed to this thread. Message ID: <nccgroup/ScoutSuite/issues/1385/1133643851 @ github. com>

stephenc01 avatar May 22 '22 17:05 stephenc01

The above is message coming from console, but doesn't give any specific information on actual implementation, particular version of API and point in code where this should be injected. Also it means something is inconsistent either on scout side or azure library or azure backend. As the error doesn't appear globally, only in security center

bzogala avatar May 23 '22 09:05 bzogala

@fernando-gallego looks like the issue will be resolved in the develop branch, but also after the merge of #1425 Graph API will only return 100 results and Microsoft refers to this as Paging: https://docs.microsoft.com/en-us/graph/paging

Popzi avatar Jun 08 '22 13:06 Popzi

@Popzi could you please create an issue for this?

michyweb avatar Jun 14 '22 11:06 michyweb

Workaround implemented in version 5.12.0, following up in https://github.com/nccgroup/ScoutSuite/issues/1428

fernando-gallego avatar Sep 12 '22 11:09 fernando-gallego

I'm getting MissingApiVersionParameter error even with v5.12.0.

scout[15213] ERROR securitycenter.py L86: Failed to retrieve compliance results: Azure Error: MissingApiVersionParameter
Message: The api-version query parameter (?api-version=) is required for all requests.

tkmru avatar Sep 21 '22 10:09 tkmru