If I comment out the following in TMSFNCCloudMicrosoft.pas it works fine:
procedure InitializeRetrieveAccessTokenRequest(const ACloudBase: TTMSFNCCloudOAuth);
begin
ACloudBase.Request.Clear;
ACloudBase.Request.Name := 'RETRIEVE ACCESS TOKEN';
{$IFNDEF WEBLIB}
ACloudBase.Request.Host := 'https://login.microsoftonline.com';
ACloudBase.Request.Path := '/common/oauth2/v2.0/token';
ACloudBase.Request.PostData := 'client_id=' + TTMSFNCUtils.URLEncode(ACloudBase.Authentication.ClientID)
// + '&client_secret=' + TTMSFNCUtils.URLEncode(ACloudBase.Authentication.Secret)
+ '&redirect_uri=' + TTMSFNCUtils.URLEncode(ACloudBase.Authentication.CallBackURL)
+ '&access_type=offline'
+ '&approval_prompt=force'
+ '&code=' + TTMSFNCUtils.URLEncode(ACloudBase.Authentication.AuthenticationToken)
+ '&grant_type=authorization_code';
ACloudBase.Request.Method := rmPOST;
{$ENDIF}
end;
procedure InitializeRetrieveRefreshTokenRequest(const ACloudBase: TTMSFNCCloudOAuth);
begin
ACloudBase.Request.Clear;
ACloudBase.Request.Name := 'REFRESH ACCESS TOKEN';
{$IFNDEF WEBLIB}
ACloudBase.Request.Host := 'https://login.microsoftonline.com';
ACloudBase.Request.Path := '/common/oauth2/v2.0/token';
ACloudBase.Request.AddHeader('Content-Type', 'application/x-www-form-urlencoded');
ACloudBase.Request.PostData := 'client_id=' + TTMSFNCUtils.URLEncode(ACloudBase.Authentication.ClientID)
// + '&client_secret=' + TTMSFNCUtils.URLEncode(ACloudBase.Authentication.Secret)
+ '&code=' + TTMSFNCUtils.URLEncode(ACloudBase.Authentication.AuthenticationToken)
+ '&redirect_uri=' + TTMSFNCUtils.URLEncode(ACloudBase.Authentication.CallBackURL)
+ '&refresh_token=' + TTMSFNCUtils.URLEncode(ACloudBase.Authentication.AccessTokenRefresh)
+ '&grant_type=refresh_token';
ACloudBase.Request.Method := rmPOST;
{$ENDIF}
end;