How to restrict scope while fetching the OAuth Token from AZURE

Karteek Koraganji 61 Reputation points
2021-05-15T13:25:11.133+00:00

Hi,

I am using postman as provided below to fetch oauth token for getting access for SharePoint REST APIs.
96873-screenshot1.png
I have provided scope as User.Read.All .
But when I am getting access token, in the scope section I am getting all the scopes which are available for the application(registered in azure).
96874-screenshot2.png

Is there any way to restrict the access token to the specified scope as provided in the screenshot1?
Please suggest.

Microsoft 365 and Office | SharePoint | For business | Windows
0 comments No comments
{count} votes

Accepted answer
  1. MichaelHan-MSFT 18,126 Reputation points
    2021-05-17T08:07:19.383+00:00

    Hi @Karteek Koraganji ,

    Got the same result as yours on my end. Looks like we cannot restrict specified scope for access token.

    As a workaround, you could register a new app in AAD and grant specified permission.


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    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.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.