CORS issue while calling yammer rest API with azure ad token from the angular app.

New Contributor

CORS issue while calling yammer rest API with azure ad token from the angular app. 

Vishnu1610_0-1597824075721.png

Request URL: https://api.yammer.com/api/v1/messages/my_feed.json?threaded=extended&limit=3
Referrer Policy: no-referrer-when-downgrade
cache-control: max-age=0, private, must-revalidate
content-encoding: gzip
content-language: en-US
content-security-policy-report-only: default-src 'self'; connect-src 'self' *.skype.com *.yammer.com *.microsoft.com wss://*.rt.yammer.com/cometd/ *.skypeassets.com api.tenor.com suite.office.net portal.partner.microsoftonline.cdnsvc.com prod.msocdn.com prod.msocdn.de r1.res.office365.com shellux.msocdn.com webshell.suite.office.com webshell.suite.office.de webshell.suite.partner.microsoftonline.cn; frame-src 'self' *.bing.com *.live.com *.lync.com *.microsoft.com *.microsoftonline.com *.office.com *.office365.com *.outlook.com *.windows.net *.sharepoint.com portal.partner.microsoftonline.cdnsvc.com prod.msocdn.com prod.msocdn.de r1.res.office365.com shellux.msocdn.com webshell.suite.office.com webshell.suite.office.de webshell.suite.partner.microsoftonline.cn; font-src 'self' *.assets-yammer.com *.msocdn.com *.microsoft.com *.skype.com *.sharepointonline.com portal.partner.microsoftonline.cdnsvc.com prod.msocdn.com prod.msocdn.de r1.res.office365.com shellux.msocdn.com webshell.suite.office.com webshell.suite.office.de webshell.suite.partner.microsoftonline.cn; img-src 'self' data: *.assets-yammer.com *.msocdn.com *.microsoft.com *.microsoftonline.com *.office.com *.office365.com thumbnails.yammer.com *.lync.com *.skype.com *.msecnd.net media.tenor.com portal.partner.microsoftonline.cdnsvc.com prod.msocdn.com prod.msocdn.de r1.res.office365.com shellux.msocdn.com webshell.suite.office.com webshell.suite.office.de webshell.suite.partner.microsoftonline.cn; media-src 'self' *.skype.com *.yammer.com *.assets-yammer.com *.msocdn.com portal.partner.microsoftonline.cdnsvc.com prod.msocdn.com prod.msocdn.de r1.res.office365.com shellux.msocdn.com webshell.suite.office.com webshell.suite.office.de webshell.suite.partner.microsoftonline.cn; script-src 'self' *.rt.yammer.com 'unsafe-inline' 'unsafe-eval' *.office.com *.assets-yammer.com *.msocdn.com *.microsoft.com *.skype.com portal.partner.microsoftonline.cdnsvc.com prod.msocdn.com prod.msocdn.de r1.res.office365.com shellux.msocdn.com webshell.suite.office.com webshell.suite.office.de webshell.suite.partner.microsoftonline.cn; style-src 'self' 'unsafe-inline' *.assets-yammer.com *.msocdn.com *.microsoft.com *.microsoftonline.com *.office.com *.office365.com *.outlook.com *.skype.com suite.office.net portal.partner.microsoftonline.cdnsvc.com prod.msocdn.com prod.msocdn.de r1.res.office365.com shellux.msocdn.com webshell.suite.office.com webshell.suite.office.de webshell.suite.partner.microsoftonline.cn; report-uri /__csp__/reports
content-type: application/json; charset=utf-8
date: Wed, 19 Aug 2020 07:47:22 GMT
etag: W/"e4d119125b30b71d0521207a6fb93e8d"
nel: {"report_to":"default","max_age":3600,"success_fraction": 0.001}
p3p: CP="NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM"
report-to: {"max_age":3600,"endpoints":[{"url":"https://mmay.nelreports.net/api/report?cat=yammer-prod_central_1_static"}]}
status: 200
strict-transport-security: max-age=31536000; includeSubDomains; preload
strict-transport-security: max-age=1234513412313; includeSubDomain
vary: Accept-Encoding
x-b3-traceid: 7d08752fe74cdd8b
x-cell-id: 2
x-client-application-id: 47518
x-content-type-options: nosniff
x-date: 1597823243137
x-frame-options: SAMEORIGIN
x-lodbrok-cell: prod_central_1_static-c2
x-msedge-ref: Ref A: D011C63932FB4D60AE98AB5597693F2B Ref B: MAA01EDGE0618 Ref C: 2020-08-19T07:47:22Z
x-network-id: 5c8085d9-1e88-4bb6-b5bd-e6e6d5b5babd
x-request-id: 2aa2565f-7c83-45cc-8373-bf5c0c3a8fd5
x-robots-tag: none
x-runtime: 0.742599
x-xss-protection: 1; mode=block
x-yammer-serve: Azure-Workfeed-Nginx
4 Replies

@Vishnu1610  Let me know if you get any resolution on this. I am getting same error on my React App

I am also really looking forward to an answer and a solution on this matter.

@ZaklinBelfor  You have to set callback url while registering the app. Please go through this documentation Step 1: App Registration · Yammer Developer Site

 

Vishnu1610_0-1614876987880.png

 

@Vishnu1610  But we registered app in Azure AD and not in Yammer. We are using Azure AD token.