Hello
@VIJAY KUNWAR,
You've really got two different questions here. The first seems to be how do you use the SharePoint connector in general while the second is how do you set up Delegated access authentication.
Let's start with the first question about using the connector. From the start, you should be able to execute any action that requires the SharePoint site ID because the site ID can be specified as either the user-friendly FQDN of the site (ex. contoso.sharepoint.com) or the sites full ID which is a composite of the following values:
- Site collection hostname (contoso.sharepoint.com)
- Site collection unique ID (GUID)
- Site unique ID (GUID)
If you want to get the full (i.e. composite) ID of the site you can call the
Get Root Site action on the connector. Alternatively, you can call the
Get Site by Site ID action and pass in the FQDN of the site.
As for the other values (Drive ID, File ID, etc), it's a matter of calling various actions on the connector and then iterating over the response data. For example, the get a list of Drive ID's of your root SharePoint site you could call the
Get Root Site action followed by the
Get All Drives action. Alternatively, you could just call
Get All Drives directly, or even
Get Default Drive Details if there's a single drive associated with the site, since you already know the FQDN of your SharePoint site.
Once you have the ID of the specific drive associated with your SharePoint site, you'll want to call
Get Root Folder ID for the specific SharePoint site and drive. This will give you the top-level folder ID for the drive. From there, you can call
Get Drive Items to get a collection of all the contents in that specific folder. Then you would iterate over that collection and drill into any other child folders you may be interested in.
On to the second question, authentication. There are two token types available when using the
Microsoft Graph - Authentication VBO. They are
Application Access and
Delegated Access. Application Access tends to be the easier method and is meant for
service-to-service or
machine-to-machine communication. It's a similar idea to what are known as
Service Accounts on Windows.
Delegated Access, on the other hand, is where you're requesting access on behalf of a specific user account. In other words, your digital worker is going to work on behalf of a specific user (ex John Doe). If you look through the Graph API reference, you'll see many examples of actions that are only supported with Delegated Access. To use Delegated Access you must provide an OAuth2
Client ID and
Client Secret as well as the Active Directory
Username and
Password of the user account you are trying to work on behalf of.
Of course you also have to pass in your Microsoft 365 tenant ID. All of this information can be collected from the Microsoft 365 AD console. If you don't have direct access to that, you'll have to request the information from your IT team. This includes having them set up an application definition for you in AD. Below are some screenshots of a test application definition I have created in my Azure sandbox along with some of the Graph API permissions I applied to that application so that it could work with my SharePoint sites.
Hope this helps. If not, let me know what specific questions you have.
Cheers,
------------------------------
Eric Wilson
Director, Integrations and Enablement
Blue Prism Digital Exchange
------------------------------