Is it possible to generate a Yammer API access token with Yammer and Sharepoint scopes/workloads?

GR 41 Reputation points


I'm trying to generate Yammer API access token that I can also use to download SharePoint files that are shared on Yammer. I've been generating access tokens using url.

I know that I'm able to use multiple permissions in the same request for the single scope, but is it possible to generate an access token that use Yammer API and Site-Id SharePoint API scopes/workloads together?

I'm trying to use the Yammer API scope along with site-id SharePoint scope, however I haven't not been able to use it together. The authentication fails when both scope are used at the same time, I can see "Error: invalid_client' in the response". It means I'd need to use two access tokens. Is it possible to generate an access token that use Yammer API and Site-Id SharePoint API scopes together?

Yammper API scope: Files.ReadWrite.All Sites.ReadWrite.All Directory.ReadWrite.All offline_access

Site-Id SharePoint API scope: Sites.ReadWrite.All User.ReadWrite.All offline_access


Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,451 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
2,644 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,301 questions
0 comments No comments
{count} votes

Accepted answer
  1. CarlZhao-MSFT 36,411 Reputation points

    Hi @GR


    You can only get tokens for one API endpoint because access tokens are issued based on the API audience you want to access, and it is unique, i.e. a token can only have one API audience, so using multiple API scopes to request an access token is obviously not supported.

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

0 additional answers

Sort by: Most helpful