I have previously completed the OAuth2 process for resources accessed via Azure AD in another project but cannot work out how to request an authorization code and token for programmatic manipulation of git repositories. The documentation on docs.microsoft.com is unclear as to which endpoints to access. For instance, it is written on pages relating to git repositories that the following URL is for the authentication code:
https://app.vssps.visualstudio.com/oauth2/authorize&response_type=Assertion
but following that link gives me an unsafe request response, and changing that & to a? gives a 500 internal server error. Similarly, the token endpoint URL doesn't appear to make any sense:
I'm unsure what fields are referred to there as "client_assertion_type" but presumably, grant_type is "code"
The idea here is to be able to use Azure API to list information about repos, create new ones, modify branch policies etc etc