From the documentation here https://learn.microsoft.com/en-us/azure/devops/integrate/get-started/authentication/oauth?view=azure-devops , it seems it is possible for an application to use OAuth2 Authorization Code Flow to get an access token. However, if i try to get the access token using client credentials flow I get invalid_resource error. It seems the token endpoint support the client credential flow, but I cant get it working.
POST https://app.vssps.visualstudio.com/oauth2/token
Content-Type application/x-www-form-urlencoded
grant_type=client_credentials&redirect_uri=$url&client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer&client_assertion=$assertion&client_id=$clientid&client_secret=$secret&scope=vso.code
what could be the correct resource value?