cancel
Showing results for 
Search instead for 
Did you mean: 

Microsoft Graph Authentication VBO

willem.d4s
Level 5
Hi all,

I am trying to use the Microsoft Graph - SharePoint Upload Session VBO v2.0 from DX.  As first step I need Blue Prism to authenticate against Sharepoint, I am trying to use the Application Access route.

Status output from Utility - HTTP missing?

We have generated the Client ID, Tenant ID and Secret.   I put those as inputs for the action Get Application Access Token ( Microsoft Graph - Authentication VBO ).  When I step over it gives me an error:

"Internal: Cannot perform = operation when the left-hand value is empty.". 

When I step into Get Application Access Token, I can see this is because the Request Token action that is referenced (part of Utility - HTTP) does not have an Output called Status (or perhaps Status Code?).  I have looked in BP version 6.6.0 and in 6.10.4, and the Utility - HTTP in both versions of BP does not seem have the Status output that is used in the Authentication VBO to see if  Status=200. 

The DX page suggests that version 6 is supported, so why is the Status output missing?  ( Am I missing something ? )

Many thanks,
Willem



------------------------------
Willem Borgesius
Technical Director
Delta4Services
Europe/London
------------------------------
7 REPLIES 7

ewilson
Staff
Staff
Hi @Willem Borgesius,

Please download the latest version of the Utility - HTTP VBO from the Digital Exchange. It should have a note on the Initialise tab that shows Version: 6.10.3. This includes the output parameter Status Code in the HTTP Request action.

Cheers,



------------------------------
Eric Wilson
Director, Integrations and Enablement
Blue Prism Digital Exchange
------------------------------

Thanks Eric, I updated the utility from the Digital Exchange and that resolved that issue.

After running the Authentication I am calling the action "Create Upload Session" from the VBO "Microsoft Graph - Sharepoint Upload Session".  However, I received a compile error, it does not recognise the $ on line 6. 

Any idea why this might be or how I can resolve it?

7528.png

------------------------------
Willem Borgesius
Technical Director
Delta4Services
Europe/London
------------------------------

Hello @Willem Borgesius,

Couple questions for you:

  1. What version of the Blue Prism are you running?
  2. What locale (ex. en-UK)?
  3. What version(s) of the .NET Framework are installed on your machine?

The $, in this context, is a C# operator for string interpolation. In other words, it's converting everything that shows up between curly braces (i.e. { }) as variables and replacing them with their actual values. The feature was introduced in C# v6 back in 2015, so I imagine it shouldn't be an issue of older .NET version. ​

You can change the line to the more traditional string concatenation format. Following is an example. Just replace the line in your VBO with this one:

string url = "https://graph.microsoft.com/v1.0/sites/" + siteId + "/drives/" + driveId + "/" + folderPath + "/" + fileName + ":/createUploadSession";


That should take care of you.

Cheers,



------------------------------
Eric Wilson
Director, Integrations and Enablement
Blue Prism Digital Exchange
------------------------------

Thanks Eric, that replacement code works fine. 

In answer to your questions:

1. What version of the Blue Prism are you running?

6.6.0

2. What locale (ex. en-UK)?
I believe it is en-UK

3. What version(s) of the .NET Framework are installed on your machine?
.NET Framework 4.8

------------------------------
Willem Borgesius
Technical Director
Delta4Services
Europe/London
------------------------------

@Willem Borgesius,

Glad to hear the revised line works for you. BP v6.6 requires .NET v4.7 or later which would be at least C# 7, so that doesn't seem to be the issue here. We'll try to fine some time to recreate your environment and see if we can get the same exception because we're not seeing it in our environments. 🤔

Cheers,


------------------------------
Eric Wilson
Director, Integrations and Enablement
Blue Prism Digital Exchange
------------------------------

TemitayoOladime
Level 2

How did you generate access token ,Client ID, Tenant ID and Secret



------------------------------
Temitayo Oladimeji
------------------------------

@TemitayoOladime,

The Client ID, Client Secret, and Tenant ID would generally be provided to you by your Azure administrator when they create the application registration for you in Azure AD. Once you have those, you can use the MSAL.NET connector, available on the Digital Exchange, to request an access token.

Cheers, 



------------------------------
Eric Wilson
Director, Integrations and Enablement
Blue Prism Digital Exchange
------------------------------