Support > Forums > OpenBots Studio > Error when using Get Outlook 365 Emails
Hi OpenBots community,
Version 1.7
I got the following error when trying to get 365 email using [Get Outlook 365 Emails] command.
> already create M365 Instance > import 4.6.0 Microsoft.Graph and set output message data type is [List<Microsoft.Graph.Message>]
Error Occurred at Line 3: [Type: 'System.ArgumentException', Message: 'Object of type 'System.Collections.Generic.List 1[Microsoft.Graph.Message]' cannot be converted to type 'System.Collections.Generic.List 1[Microsoft.Graph.Message]'?']
Can you provide with some guidance? Thanks!
This forum has 317 topics, 687 replies, and was last updated 4 months ago by Nataly Alvarado...
Hi POOMAL001,
Problem solved. cuz Studio read same dll in different path Error is casting [A] to [B]
A path : C:\Program Files (x86)\OpenBots Inc\OpenBots Studio\Microsoft.Graph.dll B path : C:\Users{user_name}\AppData\Local\OpenBots Inc\packages\Microsoft.Graph.4.6.0\lib\net462\Microsoft.Graph.dll I delete Microsoft.Graph.dll under A path and add Microsoft.Graph.dll.refresh point to B path, List<Message> parse success.
Thanks~
Hi MICCHA001,
Thankyou for your reply. I just would need a confirmation whether you are able to get the emails into the variable List<Microsoft.Graph.Message>. Or is it a issue entirely with get emails command and if yes , can you share the error description.
If you are able to get the value out of List<Microsoft.Graph.Message> then you can use for each loop or loop commands to get individual list items.
Another suggestion would be to uninstall the Microsoft.Graph package and re-install and try to run the script.
Hi POOMAL001,
Thanks for your reply!
for M365 Instance variable, both client ID and tenant ID have already created.
if parse output to datatype [object], i can get string json result (right format?right data)
but I can't parse output to [List<Microsoft.Graph.Message>] datatype
I wonder if this is a nuget issue?
Hi MICCHA001,
Thankyou for reaching out to us. Before using the Get Outlook365 Emails command, you need to add a command before which will create the Outlook365 Instance. Command name - Microsoft 365 Create session, where you need to create the Instance variable, give client ID and tenant ID. Then after that add the Get Outlook365 Emails command. To find the ID Reference Link - http://blog.schertz.name/2018/06/locating-ids-in-azure-ad/
Please let me know in case of further queries.
You are not authorized to reply, please click here to login and add your reply to this topic.