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

Some examples on the Security Update API page are wrong #4

Closed
mattfoster opened this issue Apr 13, 2017 · 7 comments
Closed

Some examples on the Security Update API page are wrong #4

mattfoster opened this issue Apr 13, 2017 · 7 comments
Assignees

Comments

@mattfoster
Copy link

Apologies if this is the wrong place to report this sort of feature request. Please let me know if I should file this elsewhere.

The examples on https://portal.msrc.microsoft.com/en-us/developer don't appear to be correct.

Most of the example reference an access token, for example:

@ECHO OFF

curl -v -X GET "https://api.msrc.microsoft.com/cvrf/{id}?api-version=2016-08-01"
-H "api-key: {subscription key}"
-H "Authorization: {access token}"

But there is no information on how to obtain such a token, and the example requests work without adding the Authorization header. In addition, the accompanying documentation does not mention this token.

@craig-martin
Copy link
Contributor

Thanks for keen eye, Matt! The APIs accept two forms of authentication, API keys and access tokens. The option to use access tokens in the Authorization header is for internal use only today (it only accepts tokens from the Microsoft AAD tenant).

I'll update the help to omit that part of the samples.

@craig-martin craig-martin self-assigned this Apr 13, 2017
@IrootGeek
Copy link

IrootGeek commented May 17, 2017

Hi @mattfoster ;
I try to get API KEY of https://portal.msrc.microsoft.com/en-us/developer but i have the same problem redirect to home page "https://portal.msrc.microsoft.com/en-us/"
How a bout you, do you get your API Key?
Thanks!

@mattfoster
Copy link
Author

mattfoster commented May 17, 2017 via email

@IrootGeek
Copy link

Hi @mattfoster ,
The problem is in the web page of https://portal.msrc.microsoft.com/en-us/developer
Microsoft Security Update API
The Microsoft Security update API is a RESTful API that allows customer to obtain Microsoft security update information. Sample code is available on the Microsoft Security Updates API Github repository which demonstrates how to query this API for automation and reporting purposes.
Create New Key
but if click in Create New Key the page redirect to login ---> home page "https://portal.msrc.microsoft.com/en-us/"

@mattfoster
Copy link
Author

Hi @IrootGeek,

I didn't have any problems getting an API key, I just signed in and it worked when I hit the button. Maybe someone from Microsoft can help you.

@ms-AlexDavis
Copy link
Contributor

The last part of this thread runs along side issue #15.

In regards to the original issue, we do not maintain the portal page. Issues pertaining to that can be posted here: https://social.technet.microsoft.com/Forums/security/en-us/home?forum=securityupdateguide

But yes, you don't have to worry about the Authorization header.

@christianmlong
Copy link

Here's an example of a curl command that worked.

curl -v -X GET -o ms_cvrf.xml "https://api.msrc.microsoft.com/cvrf/2017-Sep?api-version=2016-08-01" -H "api-key: ###############"

mdressman pushed a commit that referenced this issue Dec 14, 2020
Merge pull request #74 from p0w3rsh3ll/master
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

5 participants