Jul 15, 2019

Connect to SharePoint Online from Postman

To connect to SharePoint Online with Microsoft Graph using OAuth 2.0 from Postman:
  1. Create an Azure AD App Registration with implicit grant flow and permissions for Microsoft Graph to Sites.Read.All
  2. In Postman, set the Get URL as https://graph.microsoft.com/v1.0/sites/mytenant.sharepoint.com:/subsitename:/lists/listname/items
  3.  In the Postman authorization section:
    1. Grant Type: Authorization code
    2. Callback URL: http://localhost
    3. Auth URL: https://login.microsoftonline.com/mytenant.onmicrosoft.com/oauth2/v2.0/authorize 
    4. Token URL: https://login.microsoftonline.com/mytenant.onmicrosoft.com/oauth2/v2.0/token 
    5. Client Id: The client id from your Azure AD App Registration
    6. Client secret: the client secret from your Azure AD App registration
    7. Scope: Sites.Read.All
    8. Save the changes and update the token.
  4. Send the GET request

No comments:

Post a Comment