We’re excited to inform that all Yammer v1 APIs now support the usage of Azure Active Directory (AAD) tokens. This is a critical step in Yammer’s authentication journey across web, mobile and platform to fully use AAD tokens instead of the Yammer OAuth token.
In this blog, we’d like to share steps for creating an AAD app, and visualizing Yammer API responses via the Postman client with AAD tokens.
Download the Postman Collection here.
1. Register a new app in Azure Active Directory
Go to https://portal.azure.com and register a new application.
2. Get app registration details
Copy the Client ID and Secret, and set the Redirect URI to https://www.getpostman.com/oauth2/callback
3. Endpoints
Copy the OAuth 2.0 endpoints from the Azure portal to input into Postman
4. Request Yammer API permissions
Choose Yammer from the list of API permissions
6. Enable Delegated permissions
Choose Delegated permissions and user_impersonation. Application permissions are currently not supported and we’re planning on addressing that limitation.
7. Yammer permission is added
Yammer is added with a user_impersonation scope
8. Generate a new client secret
Generate a new client secret and choose to refresh the secret every year, every two years, or never
9. Get Postman ready
Import the Yammer API collection into Postman
10. Enter Azure Active Directory Token details
Get the details from the Application Overview page for your app and endpoints and input into Postman and request token. Here's the fields:
Callback URL: https://www.getpostman.com/oauth2/callback
Auth URL: https://login.microsoftonline.com/organizations/oauth2/v2.0/authorize
Access Token URL: https://login.microsoftonline.com/organizations/oauth2/v2.0/token
Client ID: Your Client ID
Secret: Secret that was generated in step 8
Scope: https://api.yammer.com/user_impersonation
11. Consent permissions
Consent permissions on behalf of your organization
12. Generate AAD Token
Generate and use your new AAD token. Token lifetime is 60 minutes.
13. Set variables in Postman
So you don't have to repeat typing, set a variable with the Yammer API URI prefix. Set yamURI to https://www.yammer.com/api/v1/
14. Select update and you are ready
Postman is now ready to make requests to Yammer API endpoints using Azure Active Directory tokens.
As Yammer integrates further into Microsoft 365, we’re excited for additional platform opportunities through the Azure Active Directory - this is just the beginning. We’re interested in all your feedback so be sure to comment on this blog or join us on the first Wednesday of every month in the Monthly Yammer Platform and API Office Hours.