Closed ghanshyambb closed 3 years ago
You'll need to describe your scenario in more detail. Who are the actors? What is the nature of this application?
@MIchaelMainer i have created api application to get information of azure resources with all its property. i have registered my app in azure portal under active directory through which i will get all the resource information by different sdk now i want to get information of Active directory using graph sdk. i have use above code for authentication for active directory detail under my subscription.
Hi @ghanshyambb
Thank you for reaching out and opening this issue. This client library will not leave the preview state. Microsoft.Graph v4 now integrates with Azure.Identity which supports a wide variety of authentication flows out of the box. We suggest that you migrate to v4 + Azure.Identity. Read more about it in this issue.
This issue won't be fixed, and the repository will be archived.
Inner Exception: Code: authenticationChallengeRequired Message: Authentication challange is required.
`IConfidentialClientApplication confidentialClientApplication = ConfidentialClientApplicationBuilder .Create(clientId). WithRedirectUri("https://login.microsoftonline.com/common/oauth2/nativeclient") .WithClientSecret(clientSecret) .WithAuthority("https://login.microsoftonline.com/organizations/") .Build();
string[] scope = new string[] {"Directory.AccessAsUser.All", "Directory.Read.All","Directory.ReadWrite.All" };
AuthorizationCodeProvider authProvider = new AuthorizationCodeProvider(confidentialClientApplication,scope); GraphServiceClient graphClient = new GraphServiceClient(authProvider); var directory = await graphClient.Directory.Request().GetAsync(); `
get directory give generalexception dont know what i am doing wrong any help for this? AB#7215