cancel
Showing results for 
Search instead for 
Did you mean: 

Connector for Microsoft Graph API - Users - 1.1.0

dannyhay73
Level 3

Hello - 

I am trying to use this VBO to access users in our Azure AD, but am getting the following message :

Internal : Unexpected error Error during Web API HTTP Request
HTTP Status Code: 401
HTTP Response Content: {"error":{"code":"InvalidAuthenticationToken","message":"CompactToken parsing failed with error code: 80049217","innerError"

I have a valid Token and have set up the API Permissisons Azure side ok; well least I think - but guide does not mirror the API perismisons I have in Azure, think they may have changed since publication)

(I am succesfully using the Graph Excel/Outlook VBO and have followed the same pricniples when setting this API up)

Many Thanks

Thanks



------------------------------
Danny Hay
Head Of IT Operations
Hovis Ltd
Europe/London
------------------------------
1 BEST ANSWER

Helpful Answers

Hi @dannyhay73,

In your screenshots you show that you have defined authentication within the Microsoft Graph - Users service definition. That's the old way of doing it. The current connector doesn't use that method. The Common Authentication section should be set to None and there should be a Common Header defined as Authorization with a value of Bearer [Access Token] where [Access Token] is defined as a Text input in the Common Parameters section. Have you tested it that way? If so, and you're still having issues my guess is that there's a problem with the Scope definition of the token.

Cheers,



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

View answer in original post

9 REPLIES 9

HI Danny Hay,

Looks like  this VBO has  issue  communicating based on the comments from the digital exchange.
Assuming you are using  the latest authentication VBO(https://digitalexchange.blueprism.com/dx/entry/9648/solution/microsoft-graph-api---authentication)?

https://digitalexchange.blueprism.com/dx/entry/3439/solution/connector-for-microsoft-graph-api---users-interface

adding @ewilson



------------------------------
-----------------------
If I answered your query. Please mark it as the "Best Answer"

Harish Mogulluri
Lead developer
America/New_York TX
------------------------------
-----------------------
If I answered your query. Please mark it as the Best Answer

Harish Mogulluri

Thanks Harish, @ewilson, any ideas? - Many Thanks



------------------------------
Danny Hay
Head Of Process Automation
Hovis Ltd
Europe/London
------------------------------

@dannyhay73,

How are you generating your token? Are you using the MSAL VBO or a different method?

Cheers,



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

Hi Eric,

I have tried two methods

Using the MSAL.Net VBO to Autheticate and generate a Token  (which we succefully use with Graph Excel & Graph Outlook) and using that Token in the Users - 1.1.0 VBO

7138.png

7139.png

7140.png

and

The Web API Method as described in the documenation supplied with the Users - 1.1.0 VBO, 

7141.png

- be it I do not know how this generates a Token (I have tried without exposing the credential to the process aswell)

7143.png

Many Thanks

My other consideration is the API Credentials : 



------------------------------
Danny Hay
Head Of Process Automation
Hovis Ltd
Europe/London
------------------------------

Hi @ewilson, any further thoughts ? - Many Thanks



------------------------------
Danny Hay
Head Of Process Automation
Hovis Ltd
Europe/London
------------------------------

Hi @dannyhay73,

Apologies for the delay. The Microsoft Graph - Users connector is actually defined as a Web API Service in Blue Prism, so it's slightly different in terms of how it's defined than a regular VBO. However, to work with it you should be able to follow the same general process as you do with the Graph Excel and Graph Outlook VBOs. Simply use the MSAL.NET VBO to generate a specific token and then pass that token into the actions on the Users connector via the Access Token input parameter.

Cheers,



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

Thanks Eric - I had done that (prev screen shots) and did get a valid token to pass to the process, but still got the token error.  Thanks



------------------------------
Danny Hay
Head Of Process Automation
Hovis Ltd
Europe/London
------------------------------

Hi @dannyhay73,

In your screenshots you show that you have defined authentication within the Microsoft Graph - Users service definition. That's the old way of doing it. The current connector doesn't use that method. The Common Authentication section should be set to None and there should be a Common Header defined as Authorization with a value of Bearer [Access Token] where [Access Token] is defined as a Text input in the Common Parameters section. Have you tested it that way? If so, and you're still having issues my guess is that there's a problem with the Scope definition of the token.

Cheers,



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

Fantastic @ewilson, that was the missing part of the jigsaw and the token issue is now resolved; thank you for all your help



------------------------------
Danny Hay
Head Of Process Automation
Hovis Ltd
Europe/London
------------------------------