LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Microsoft Graph and LabVIEW

I am looking into the Microsoft Graph API to send notification messages via a Microsoft Teams Channel to notify users that some action has taken place, send a warning, etc. instead of using email to send those messages or to get away from the Notification Bubble (think Outlook message notifications in the lower right hand corner) to make the notifications more real-time and users/supervisors/interested parties can take action quicker.

 

Before I dig too deep into the API, I was wondering if anyone has information to share. If not, I'll share my findings here.

0 Kudos
Message 1 of 7
(2,804 Views)

Nice Eric,

 

Waiting to see your findings

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 2 of 7
(2,743 Views)

Glad to see someone is awaiting my findings. 🤣

 

With that said, on the VERY little research I have done so far, it looks like you'll have to register the app but that's about as far as I have gotten. There was something about a AccessToken but I haven't dug into that yet. I am not sure if it is just limited to Microsoft apps (VB.NET, C#.NET, .NET Core or Framework, etc) or external ones like ours.

 

Oh, I almost forgot - I also read that developers can use the REST APIs to interact with 365 aps (HTTP VIs come to mind to interact with that are supplied with LabVIEW) but it reads like it has it's own interface which MS recommends.

 

That's it for now. Hopefully, I'll be able to dedicate some more time to this and give a much more detailed answer.

 

Eric

0 Kudos
Message 3 of 7
(2,729 Views)

I have done similar kind of approach in Accessing Google Sheets, If something similar i can support as much as possible.

 

I can able to access Google Sheets for Writing and reading data same as excel

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 4 of 7
(2,724 Views)

I found some more information. Based on what I have read, you need to register your app via the Azure Acitve Directory in the Azure Portal. It looks like it's any app and not limited to MS products like I had eluded to before. Unfortunately for my company, we haven't made that jump yet even though we are heavily ingrained in the Microsoft 365 products and services. Either that, or I have not been granted access yet to the Azure AD.

 

I have not found a way to programmatically work directly with Teams yet or even if you can.

0 Kudos
Message 5 of 7
(2,688 Views)

I believe I have a solution on how to send notifications to Teams...and it doesn't even involve Microsoft Graph.

 

In each team channel, you should be able to get the email address for the channel you want to send notifications to. If I wanted to send one to my Water Cooler Team - General Channel, all I need to do is single-click on the ellipsis and then click Get Email Address.

 

Eric1977_0-1635277097541.png

 

This should reveal the email address that should look something like this...

 

Channel - Team Name <TheToAddress@amer.teams.ms> 

 

Then, just use the provided SMTP VIs to send what notification you'd need to send and it should appear like this.

 

Eric1977_1-1635277301536.png

 

That's it!

 

I'll admit, I was pretty dumbfounded how easy this was. I didn't even think about this until I was discussing this with my coworker about not having access to the Azure AD portion of the Azure Portal and he just casually mentions "Why don't you just send an email to the Teams address?" 😫

 

Hope this helps someone else.

Message 6 of 7
(2,662 Views)

@Eric1977 wrote:

I believe I have a solution on how to send notifications to Teams...and it doesn't even involve Microsoft Graph.

 

In each team channel, you should be able to get the email address for the channel you want to send notifications to. If I wanted to send one to my Water Cooler Team - General Channel, all I need to do is single-click on the ellipsis and then click Get Email Address.

 

Eric1977_0-1635277097541.png

 

This should reveal the email address that should look something like this...

 

Channel - Team Name <TheToAddress@amer.teams.ms> 

 

Then, just use the provided SMTP VIs to send what notification you'd need to send and it should appear like this.

 

Eric1977_1-1635277301536.png

 

That's it!

 

I'll admit, I was pretty dumbfounded how easy this was. I didn't even think about this until I was discussing this with my coworker about not having access to the Azure AD portion of the Azure Portal and he just casually mentions "Why don't you just send an email to the Teams address?" 😫

 

Hope this helps someone else.


Sometimes it's like that.  You open and close your mouth a few times, then just sputter, "Great idea!  Why didn't I think of that?"

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 7 of 7
(2,652 Views)