cancel
Showing results for 
Search instead for 
Did you mean: 

MS Graph | How to get an AccessToken

OkudaTakayuki
Level 2
Hi,

Currently, I am aiming to obtain an access token using MSG.

But, an error like the image is displayed.
5972.jpg

I tried editing the HTTP Request object with reference to the MS docs.
5973.jpg
5974.jpg
Since the supported types are "individual", all permission types are "delegated".

I don't understand it's an Azure configuration problem, an HTTP object problem or something else.
I would appreciate it if anyone could tell me.


------------------------------
Takayuki Okuda
------------------ ------------
4 REPLIES 4

ewilson
Staff
Staff
Hello @OkudaTakayuki,

The definition of the Body element should be:

"grant_type=password&scope=https://graph.microsoft.com/.default&client_id="&[ClientID]&"&client_secret="&[ClientSecret]&"&userName="&[UserName]&"&password="&[Password]

With the username and password of the user account you're requesting delegated access for passed in as parameters.

Cheers,


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

gmarquez
Level 6
Hello Takayuki,

You will have to create a service account credential in your Azure environment to get the access token.

If you go to this link and read through the user guide, it will show you how to create this service account in your Azure environment to get the access token:

https://digitalexchange.blueprism.com/dx/entry/3439/solution/microsoft-graph-api---sharepoint

I hope that helps.


------------------------------
Gabe Marquez
Sr. Technical Consultant, Professional Services
Blue Prism
------------------------------

Hello Mr.Eric Wilson,
thank you for your support.

I tried your advice but it show this error.
5962.jpg

Does that mean there is a problem with the Azure settings?

The following is a list of API permissions set in Azure.
Some may not be needed.
5963.jpg


Please confirm the above.

------------------------------
Okuda Takayuki
------------------------------

Hello Mr.Gabe Marquez, thank you for your support.

I ran according to the user guide. But it was impossible.
I did the following in Azure.
1.App registration  (supported type : individual)
2.Creating a client secret
3.Added some API permissions

Is there anything missing?

Please confirm the above.



------------------------------
Okuda Takayuki
------------------------------