Jun 28 2020 10:55 PM
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)
https://docs.microsoft.com/en-us/graph/sdks/choose-authentication-providers?tabs=CS
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
.Create(clientid)
.WithTenantId(tenantid)
.Build();
InteractiveAuthenticationProvider authProvider = new InteractiveAuthenticationProvider(auth , sca);
Jun 29 2020 10:07 AM
SolutionWell 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.
Jun 29 2020 07:51 PM
Accessing Graph API requires App Registration on Azure AD. Graph Explorer is also registered as an enterprise application on Azure AD.
Jul 20 2021 08:53 AM
Jun 29 2020 10:07 AM
SolutionWell 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.