Tenant ID not found. Sharepoint API - Postman - Authnetication Token


Hello Folks,

I am registering an app on SharePoint to make List accessible to external form. App registration has been done and currently working on getting:

  1. Tenant ID
  2. Access Token

I am getting the tenant ID but when using it in postman for getting access token. Gives this error:

"error": "invalid_request",
"error_description": "AADSTS90002: Tenant 'xxxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx' not found. Check to make sure you have the correct tenant ID and are signing into the correct cloud. Check with your subscription administrator, this may happen if there are no active subscriptions for the tenant.\r\nTrace ID: d6542975-b71f-4d59-bdb3-0a4162959400\r\nCorrelation ID: 9b3bdd83-672c-413f-b0fa-ffb044c6f633\r\nTimestamp: 2021-10-08 12:46:17Z",
"error_codes": [
"timestamp": "2021-10-08 12:46:17Z",
"trace_id": "d6542975-b71f-4d59-bdb3-0a4162959400",
"correlation_id": "9b3bdd83-672c-413f-b0fa-ffb044c6f633",
"error_uri": "https://accounts.accesscontrol.windows.net/error?code=90002"

Thanks in advance.

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,796 questions
{count} votes

2 answers

Sort by: Most helpful
  1. RaytheonXie_MSFT 33,636 Reputation points Microsoft Vendor

    Hi anonymous user ,
    First we should confirm the permission to the list in the following link



    <AppPermissionRequests AllowAppOnlyPolicy="true">  
      <AppPermissionRequest Scope="http://sharepoint/content/sitecollection/web" Right="FullControl" />  

    Then create and click trust it
    Please check the steps in following link in register app

    We can get Tenant ID in following url



    The id marked with blue is Tenant ID in the picture.

    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.

    0 comments No comments

  2. Anonymous

    Thanks @RaytheonXie_MSFT for your reply.
    I've tried all above mentioned steps. But when I calling api for access Token it gives the error of wrong tenant ID or Tenant not found.

    I am using SharePoint On-Premise.