How would I utilize graph API, to pull Microsoft Service Health information into a Microsoft Teams channel?

Billy Smith 0 Reputation points
2024-04-10T21:21:58.83+00:00

Hi Guys,

I have a requirement to pull service health information from our tenant into a Microsoft Teams channel.

I am not able to use the email address attached to the Teams channel, and I am also not allowed to use Outlook in this automation. I understand that you can use Graph API within powershell to do this, does anyone have any tips/advice on how this can be completed?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,041 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,524 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Deepanshu Sharma 495 Reputation points Microsoft Vendor
    2024-04-15T17:28:57.97+00:00

    Hi Billy,

    The error message you’re encountering indicates that the Format property is not recognized within the DefaultQueryParameters class. To resolve this issue, you need to ensure that you have the correct assembly reference and using directive in your code.

    Here are the steps to address this issue:

    1. Add the Assembly Reference: Right-click on the References section in your project. Search for System.Configuration in the list of .NET assemblies. If it’s not already referenced, select it and click OK to add it to your project.
    2. Check Using Directives: Make sure you have the following using directive at the top of your C# file:C#
           using
           
      
      AI-generated code. Review and use carefully.
    3. Verify Correct Full Names: Ensure that you’re using the correct full names of types and namespaces in your code. Double-check that the Format property is part of the DefaultQueryParameters class.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.