3

It is possible to use Azure SSO Token to call Yammer Rest API?

I registered an Application portal.azure.com>Azure Acitve Direcotry. The application is a Spring Boot which is deployed as Azure Web App.

Getting a token over Web App is no Problem, but if i tried to call Yammer Rest API e.g https://www.yammer.com/api/v1/messages/following.json with Header Authorization: Bearer eyJ0....' I'll get 401 Unauthorized.

On the Yammer Doc is the possibilty to register an Application in the yammer Network but there is nothing regarding active directory.

Did somebody found a solution

ehmkey
  • 188
  • 1
  • 14
  • 1
    Yammer v1 APIs now support the usage of Azure Active Directory (AAD) tokens. https://techcommunity.microsoft.com/t5/yammer-blog/yammer-api-with-aad-tokens-postman-collection/ba-p/857923 – ClairV Mar 04 '20 at 00:15

1 Answers1

1

It is currently not supported, or recommended, to use Azure AD tokens with the Yammer API. Follow the documentation for the OAuth flows to get a token which will work with all types of Yammer user (Azure AD backed, or not) and be fully supported.

Brian Lyttle
  • 14,558
  • 15
  • 68
  • 104
  • What is the recommended way to have different Authorities? I'd like to have e.g. an admin area – ehmkey Apr 16 '19 at 05:17
  • I'd need to more detail, but I think you are talking about authorization as opposed to authentication. You know which Yammer user you are dealing with from the OAuth flow and token, but what that user is allowed to do is something your application needs to handle. You can see if the token belongs to a Yammer user, admin, or verified admin based on the output of https://www.yammer.com/api/v1/users/current.json, but possibly from the JSON at the end of the OAuth flow (can't test this moment). – Brian Lyttle Apr 16 '19 at 18:30