# Postman

Postman will be required when configuring the permissions for the application that will access SharePoint.

Moment has created a workspace that can be used for this purpose.&#x20;

It's recommended that you fork the "SharePoint" collection to your own postman profile. Any data added to the public workspace will be available for anyone accessing this workspace.

The workspace can be found [here](https://www.postman.com/moment-team-api/workspace/moment-sharepoint/overview).&#x20;

## Forking collection

To fork this, click on the three dots to the left of the "SharePoint" name and select "Create a fork"

<figure><img src="/files/XGU3bcUdAfW9AFAMHEUN" alt=""><figcaption></figcaption></figure>

In the dialog that appears, enter the name you want it to have in your workspace, and select the workspace where you want this fork to appear. (If you have multiple)

<figure><img src="/files/RrA0r20F9omq6j1WxiGQ" alt=""><figcaption></figcaption></figure>

Now you will have a copy of the collection in your own workspace and you can make changes to it.

## Use collection

When the collection is forked, the various variables in the collection can be filled out.

<figure><img src="/files/eh3034QQQAWYIYBnQQA7" alt=""><figcaption></figcaption></figure>

### Authorization

Click on the "SharePoint" collection name. In the right panel you will at this time see the configuration of OAuth 2.0 configuration. This has been pre-filled with the values needed to get tokens for the tasks to be done. So do not make any changes to this page.

### Variables

Select the tab named "Variables". This contains a table with defined variable names. Leave the names as they are. To use this, copy the values collected from Azure Active Directory Apps in here

* TenantID: This is the Tenant ID from the overview page
* ClientID: This is the Client ID from application #2 (admin application)
* ClientSecret: This is the Secret from application #2 (admin application)
* SiteToEditPermission: This is the Site ID collected, the site where the permission is to be defined.
* ApplicationIdToGivePermission: This is the Client ID from application #1 (integration application)
* PermissionToRemove: This is to be used if one ever needs to remove a permission.

<figure><img src="/files/w9f5LSlw1uqIFcNeS6lF" alt=""><figcaption></figcaption></figure>

### Get Token

Prior to doing any actions, the token to be used when doing the various operations must be generated and stored. To get this, return to the "Authorization" tab. Scroll to the bottom of this page and locate the "Get New Access Token" button.

Click on this button, a dialog appears showing that it is getting the access token. Eventually it's showing that the authentication was completed. Now click on the "Proceed" button.

<figure><img src="/files/WKSUk0apNJV2TVWoi41P" alt=""><figcaption></figcaption></figure>

The new dialog appearing will containt the token that have been returned. Now just click on "Use Token" button.

<figure><img src="/files/4aimbGLghmdB8TNlI9yT" alt=""><figcaption></figcaption></figure>

The token has now been stored. The token is valid for an hour.

### Add site permission

To add permission to a site, open the folder "Actions" and click on the "Set Site Permission". There is no need to make any changes to this as all the variables that was defined above are going to be used here. Now just click on the "Send" button to execute the setting of the permission.

<figure><img src="/files/cT7ylBafz0ru1GeABT9Q" alt=""><figcaption></figcaption></figure>

Await the completion of the setting of the permission - the result will be as shown below.

<figure><img src="/files/oQO9ZSH1GCdKlHRPQXRh" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.milientsoftware.com/help/moment-by-topic/integrations/real-time-integrations/sharepoint/configuration/azure-active-directory/postman.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
