Notifications
Announcements
No record found.
Are you getting an error ? If so, what is the error, and what are you doing when you get the error ?
I get error trying to register a plug-in that has been merged with Microsoft.Identity.Client
Frustrating
Hi,
Use below code to get access token withour using ADAL library.
private static async Task GetToken() { using (HttpClient httpClient = new HttpClient()) { var formContent = new FormUrlEncodedContent(new[] { new KeyValuePair("resource", Resource), new KeyValuePair("client_id", ClientId), new KeyValuePair("client_secret", ClientSecret), new KeyValuePair("grant_type", "client_credentials") }); HttpResponseMessage response = await httpClient.PostAsync(Authority, formContent); return !response.IsSuccessStatusCode ? null : response.Content.ReadAsStringAsync().Result; } }
Please see below repository for sample web api code in C#.
https://github.com/jlattimer/CrmWebApiCSharp/blob/master/CrmWebApiCSharpNoAdal/Program.cs
Hey Bipin Kumar
how does the Authority look like in the given example?
THX,
Alan
Hi AlanCRM23 ,
You can use:https://login.microsoftonline.com/<tenant>/https://login.microsoftonline.com/common/
See: learn.microsoft.com/.../msal-client-application-configuration
For authority discovery in javascript (works with Dynamics online and on-premises): github.com/.../authority.ts
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Tom_Gioielli 170 Super User 2025 Season 2
#ManoVerse 70
Jimmy Passeti 50 Most Valuable Professional