Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 general forum
Unanswered

Using Microsoft Graph

Posted on by 30

Hi everyone,

I'm still searching how I could create a new team with its members and channel in Teams directly from Dynamics 365 through using Microsoft Graph.

I thought about creating a custom button thanks to XRMToolBox on the form in Dynamics 365 then relate a web resource to the button which calls a POST request to the Graph API and creates the team in Teams.

However, I'm not sure how Microsoft Graph should be implemented when used with Dynamics and if this is the right logic to have.

I'm waiting for you to help me on this subject as that is a very modern way to proceed.

Hope someone will answer my call, thank you

  • Jonathan92 Profile Picture
    Jonathan92 30 on at
    RE: Using Microsoft Graph

    Hi Clofly,

    I'm not sure to have understood why using a form as the origin of the flow ?

    There was an issue with the JSON for the POST request, so I suppressed everything but the displayName and then it was correct.

    After that I answer the form and I received an approval submission by email. I clicked Approve but until now I don't see the team in Teams neither I received an email of confirmation from the end of the flow for both true and false (I added to the last condition to false I added an email sending to announce me an error). I think the http request not even got sent.

    Is flow the only way to use the Graph API ?

    best regards,

    Jonathan

  • cloflyMao Profile Picture
    cloflyMao 25,194 on at
    RE: Using Microsoft Graph

    Hi Jonathan92,

    Could it work for you?

    I have been waiting for your feedback. :)

    Regards,

    Clofly

  • cloflyMao Profile Picture
    cloflyMao 25,194 on at
    RE: Using Microsoft Graph

    Hi Jonathan92,

    Maybe you don’t need to new a custom button, you can use flow to call Graph API to create a team.

    As an example we will create a team in Microsoft Teams with the help of a simple form in Microsoft Forms, Microsoft Flow and Microsoft Graph API.

    You can refer following links:

    https://www.lee-ford.co.uk/new-team-request-for-teams-using-flow-and-graph-api/

    https://daytodaydynamics365.com/creating-a-team-a-channel-and-a-d365-psa-tab-in-microsoft-teams-using-flow/

    https://modernworkplace.fremmegaard.no/2019/06/19/use-graph-api-in-flow-and-create-a-team/

    Here are steps:

    1. Create an App registration in Azure AD.

    In the Azure portal (https://portal.azure.com/#home), go to Azure Active Directory and select App registrations. Click on the New application registration.

    make a note of the Application and Directory IDs.

    select API Permissions > Graph API > Application permissions

    8228.png7215.png

    grant required permissions to the application.

    4478.png

    select Certificates and secrets. Select New client secret. And make a note of the secret.

    7024.png

    2. Create a form.

    Go to  https://forms.office.com and create a new form.

    3. Create a flow.

    Go to https://flow.microsoft.com

    012048.png

    create some variables. These variables are the application (client) iddirectory (tenant) id and secret.

    8802.png

    select Add an action and search for Forms again and select Get response details.

    6710.png

    add another action and search for Approval and select Start an approval. Fill in the approval similar to below.

    4073.png

    set condition.

    77485.png

    add this action in Yes.

    4132423.png

    4857.png

    74206.png

    0572.png

    3731.png

    Regards,

    Clofly

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 9th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,339 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,177 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans