Occasional Contributor

I have a C# Application that reads O365 groups and teams Information using graph API and generates a report. I am able to read and write teams info using graph API by authenticating using tenant info, client id and secret key (these values come from Azure APP registration). I am trying to avoid this App Registration step(tool requires client id and user login to get information). Is there any possible way to do authentication without client id?(like graph explorer does)


Above auth provider link doesn't have any authentication without clientid.

Authentication used in the tool:

static String[] sca = { "https://graph.microsoft.com/.default" };

var auth = PublicClientApplicationBuilder
InteractiveAuthenticationProvider authProvider = new InteractiveAuthenticationProvider(auth , sca);



best response confirmed by ThereseSolimeno (Microsoft)

Well you are the one deciding what type of authentication the application will use, if you want it to run in a user context simply switch to the corresponding mode. Do note that the permissions of the current user will apply for any queries you run via the app in such scenario, so you will only get access to groups/teams the user is a member of.



Accessing Graph API requires App Registration on Azure AD. Graph Explorer is also registered as an enterprise application on Azure AD.

var powerShellClientId = "1950a258-227b-4e31-a9cf-717495945fc2"; // use this one
IPublicClientApplication appDp = PublicClientApplicationBuilder
var scope = new string[] { "https://graph.microsoft.com/.default" };

var authToken = await appDp.AcquireTokenInteractive(scope)
We support Ukraine and condemn war. Push Russian government to act against war. Be brave, vocal and show your support to Ukraine. Follow the latest news HERE