cancel
Showing results for 
Search instead for 
Did you mean: 

Microsoft Graph API

GemmaHolmes
Level 3

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

GH
2 REPLIES 2

Hello Gemma,

Could you give more details? Did an error occur?

Regards,

Leonardo Soares RPA Developer América/Brazil

GemmaHolmes
Level 3

@LeonardoSQueiroz 

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.

GH