Create VM in Microsoft Azure using JAVA -
i want create vms in microsoft azure using java rest api. this, getting access token using microsoft login credentials passing below values: grant_type: client_credentials, client_id: {my_client}, client_secret: {my_client_secret}, resource:{http://localhost} then getting big access key. calling create vm rest api using access key. unauthorised error below. "code": "invalidauthenticationtokenaudience", "message": "the access token has been obtained wrong audience or resource 'http://localhost'. it should match (including forward slash) 1 of allowed audiences ' http://localhost ',' http://localhost '." how correctly call microsoft azure authentication , create vm using java? there way achieve authorization through certificate? steps? it seems might use incorrect urls azure resource management. according the offical example in java create vm , can see urls below in code comment requesting access tok...