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
Sorin Sandu
Microsoft
Oct 05, 2022Hi 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.
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.
ganeshsanap
Oct 05, 2022MVP
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.