Forum Discussion
ssandu
Oct 05, 2022Copper Contributor
How to obtain a token for an app registration and use it to access yammer
Hello,
Is it possible to obtain a token for an app registration (clientid and clientsecret) ?
I need it to use for accessing https://www.yammer.com/api/v1/messages/my_feed.json
Thanks
3 Replies
Sort By
ssandu All Yammer v1 REST API endpoints support using Azure Active Directory (AAD) Tokens that are acquired using the Microsoft Authentication Library (MSAL). MSAL is available for .NET, JavaScript, iOS and Android, which support many different application architectures and platform. Learn about using MSAL.
Source: Yammer - Implement Authentication
Check if below documentation helps you: Register An App With Yammer
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
- Sorin Sandu
Microsoft
Hi and thanks for answer
They don't want to use an Yammer app registration
They want to use an AzureAD app registration, grant Yammer permission (delegated), obtain a token from https://login.microsoftonline.com/organizations/oauth2/v2.0/token and use it to access https://www.yammer.com/api/v1/messages/my_feed.json.
I've done this in Postman but I am wondering if it's possible in SPFx web parts.Sorin Sandu You can use same Azure AD app in SPFx web parts as well. Check below documentations for more information about using Azure AD Apps in SPFx web parts:
- Connect to Azure AD-secured APIs in SharePoint Framework solutions
- Consume enterprise APIs secured with Azure AD in SharePoint Framework
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.