The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi Team,
I'm calling " https://login.microsoftonline.com/common/oauth2/token " in postman it's Working fine while integrating rest API in Angular 6
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/x-www-form-urlencoded' }) }; const body = new HttpParams() .set('client_id', 'xxxxxxxxxx') .set('client_secret', 'xxxxxxxxxx') .set('grant_type', 'password') .set('scope', 'openid') .set('resource', 'https://analysis.windows.net/powerbi/api') .set('username', 'xxxxxxxxxx') .set('password', 'xxxxxxxxxx'); return this.http.post(AppConstants.LOGIN, body.toString(), httpOptions) .pipe( map(response => response) );
above code which is used in Angular 6 but I'm not able to get access token,
getting 200 status with 'null' response.
Please give me a solution to implement rest api in angular 6.