Login to my app using my O365 tenant admin login

DeepKumarGroup-9106 20 Reputation points
2023-07-17T13:00:31.06+00:00

hi Team,

So I am trying to use login button in my app so that it get authenticated with my O365 tenant admin id and I can do task like get user teams settings related info e.g. policies assigned to them etc.. But I don't know how to code it in visual studio. any code snippet or sample code will be much appreciated. e.g. from powershell I am using connect-microsoftteams then run the commands from powershell. But I am not sure how to do same from visual studio. Like I click on a button and it prompt for O365 tenant login.

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,823 questions
{count} votes

Accepted answer
  1. Hui Liu-MSFT 48,616 Reputation points Microsoft Vendor
    2023-07-18T06:14:46.8433333+00:00

    Hi,@DeepKumarGroup-9106. To authenticate with your Office 365 tenant and access Microsoft Teams Admin APIs in your WPF application, you could try to use the Microsoft Graph API along with the Microsoft Authentication Library (MSAL). And you can view more information here.

    Best Regards,

    Hui Liu


    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

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.