Blue Prism Product

 View Only
last person joined: 21 hours ago 

This community covers the core Blue Prism RPA product.

 Microsoft Graph API

Gemma Holmes's profile image
Gemma Holmes posted 09-22-2023 16:28

Hi,

Is there a way to use the Microsoft Graph API to send a channel message if the logged in user has MFA enabled on their account?

Really struggling to get this to work. 

Currently using the below objects:

MSAL.NET::Get Auth Token - Username and Password

Microsoft Graph - Teams::Send Channel Message

Microsoft Graph API works in Postman fine, just can't get it to work in Blue Prism.

Many thanks

Leonardo Soares's profile image
Leonardo Soares

Hello Gemma,

Could you give more details? Did an error occur?

Regards,

Gemma Holmes's profile image
Gemma Holmes

@Leonardo Soares 

If I try and used the "Get Auth Token - Username and Password" action in MSAL.NET object, I get the below error:

MSAL.Desktop.4.42.1.0.MsalClientException: ErrorCode: parsing_wstrust_response_failed

Microsoft.Identity.Client.MsalClientException: There was an error parsing WS-Trust response from the endpoint. This may occur if there is an issue with your ADFS configuration. See https://aka.ms/msal-net-iwa-troubleshooting for more details. Error Message: Federated service at https://autologon.microsoftazuread-sso.com/***REDACTED***

If I use the "Get Auth Token - Client Secret" action in MSAL.NET object, it gets the access token, however when I then go to use the "Send Channel Message" action in the Microsoft Graph - Teams webservice, I get the below error:

Internal : Unexpected error Error during Web API HTTP Request

HTTP Status Code: 403

HTTP Response Content: {"error":{"code":"Forbidden","message":"Missing role permissions on the request. API requires one of 'Teamwork.Migrate.All'. Roles on the request

From my understanding of what I've looked up is that for this error to be resolved it requires the App permissions in Azure to be set to Application-Only and the Teams Group and Channel need to have their settings changed to be in a migration state. But that the "Send Channel Message" action only works if the App permissions have Delegated access, which it does.