GDAP API: Authentication


This article is describing our current GDAP API endpoint parameters, payloads and which call methods to use for specific tasks, and how to combine these workflows in C# implementation for Authentication flow.

Resource Links

Swagger UI -

Base URL:


API:  Authentication
Method: POST


Key Value Description
email Your AAD email address here
password 01vh29............oh7n97an Your password


JSON Response 1 (If the password is correct) :


JSON Response 2 (If provided incorrect):


Response type will default to - 401 (Unauthorized)

C# Method Example:

public async Task<string> GetBearerToken(string baseUrl, string Username, string Password)
string uri = $"{baseUrl}AuthService?username={Username}&password={Password}";
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uri);
request.Method = "POST";
request.ContentType = "application/json";
request.ContentLength = 0;
request.Expect = "application/json";
request.AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate;

using (HttpWebResponse response = (HttpWebResponse)await request.GetResponseAsync())
using (Stream stream = response.GetResponseStream())
using (StreamReader reader = new StreamReader(stream))
return await reader.ReadToEndAsync();

Calling this method from code:

var MyAccessToken = await loginAPI.GetBearerToken(CurrentBaseUrl, tb_Username.Text, tb_Password.Text);

Was this article helpful?

0 out of 0 found this helpful

Add comment

Please sign in to leave a comment.