How to resolve CORS issue with Yammer API search endpoint with AAD token from an Angular app?

Occasional Visitor

Screenshot 2020-11-12 210752.png

 

I face the above CORS policy error when an API call is made to the Yammer API search endpoint. 

The issue is seen when User's AAD token is created for the scope: 

 
Condition: 
The same app works when an token generated using Yammer/client application. But the app throws cors error when the token is generated using the AAD app.
 
I have followed the below process to generate access token for the user logged in:
  1. Created an app in the AAD app registration
  2. Added Yammer API as API Permission with Delegated User_Impersonation permission. 
  3. Admin granted for whole organization to use this app to login. 
  4. Use the client_ID in the MSAL library for Angular application to log user in and generate Yammer token. 
  5. Token creation successful, The token works fine when used with postman. 
 
1 Reply

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