angularjs - Azure get token with JavaScript Angular -
angularjs - Azure get token with JavaScript Angular -
this code:
$scope.gettoken = function() { // $scope.connect() $http( { method: 'post', url: $scope.urltogettoken, params: $scope.authparams, headers: {"content-type": 'application/x-www-form-urlencoded'} } ). success(function(data){ console.log("whatever" + data); }). error(function(data, status, headers, config){ console.log(data); console.log(headers); console.log(config); }) $scope.authparams = { grant_type: 'authorization_code', client_id: '03b****************ba-931c-3b19f204c736', code: 'aaabaaaav*********b', redirect_uri: 'localhost:8080' } despite grant_type parameter there getting 400 next error:
"aadsts90014: request body must contain next parameter: 'grant_type'. ↵trace id: what about?
params used send info in querysting.
use data send info in post body.
$http({method: 'post', url:$scope.urltogettoken, data:$scope.authparams, headers:{
javascript angularjs azure oauth
Thanks for providing your information and keep share with us Azure Online Course Bangalore
ReplyDelete