Skip to content
Microsoft Dynamics 365 CRM Tips and Tricks
By Inogic
  • Blogs
  • D365 Apps
  • Inogic
  • D365 / Power Platform Services
  • Maplytics Docs
  • D365 Apps Docs
    • Omnichannel Apps
      • WhatsApp4Dynamics
      • TextSMS4Dynamics
      • LiveChat4Dynamics
    • File and Storage Managment
      • Attach2Dynamics
      • SharePoint Security Sync
    • AI/Copilot Apps
      • SharePoint Knowledge AI Search
      • Predict4Dynamics
    • Visualization Apps
      • Map My Relationships
      • Kanban Board
      • Business Process Checklist
    • Productivity Apps
      • Click2Clone
      • Click2Export
      • Undo2Restore
      • Lead Assignment and Distribution Automation
      • Alerts4Dynamics
      • Translate4Dynamics
      • Subscription Recurring Billing Management
    • User Adoption Apps
      • DeDupeD
      • User Adoption Monitor
      • Gamifics365
    • Integration Apps
      • Marketing4Dynamics
      • InoLink

IFD Login code for Custom apps

By Inogic | June 2, 2009
0 Comment

With CRM 4.0 and IFD getting popular by the day. We have had to work on the Login function for CRM to support IFD install. In case of IFD the authentication type is changed to Forms Authentication where you are presented with a Sign-in page for login.

Further to our post on Login for various CRM deployments here is the code for IFD that has been added to the list.

The code below should help users developing application that need to work from an IFD environment.

/////////////////////////////////////////////////////////////////////////////////////////////////////////////
///

/// login to crm with Default Credential for IFD

 

//set orgname and url to properties
strOrg = strOrgName;
strserverurl = strCRMURL; // It must have on- premise url for example http://moss:5555

//init CrmImpersonator object
_impersonator = new CrmImpersonator();

//Initialize CrmAuthenticationToken token
token = CrmAuthenticationToken.ExtractCrmAuthenticationToken(context, strOrgName);
token.OrganizationName = strOrgName;
token.AuthenticationType = 0;

//initialize the Service
service = new CrmService();

//pass DefaultCredentials
service.Credentials = System.Net.CredentialCache.DefaultCredentials;

//pass CrmAuthenticationTokenValue
service.CrmAuthenticationTokenValue = token;
service.Url = strCRMURL + “/mscrmservices/2007/crmservice.asmx”;

 

Category: Dynamics CRM IFD Tags: IFD, Login
Post navigation
← How to login in console mode through Remote Desktop How to re-assign records of one user to another user in Dynamics CRM →

Follow Us!

Follow Us on FacebookFollow Us on TwitterFollow Us on LinkedInFollow Us on YouTubeFollow Us on InstagramFollow Us on E-mailFollow Us on Docs

Blog Series

  • Power Apps – Model Driven Apps
  • Power Apps – Canvas App
  • Power Pages
  • Power Automate
  • Power BI
  • AI Builder
  • Copilot
  • Azure OpenAI
  • Microsoft Teams
  • Dynamics 365 for Field Service

Recent Innovations

Fix SharePoint’s 5000-Item Limit in Dynamics 365 (2026 Guide)

What Is the Best Way to Manage Files and Attachments in CRM?

How to Identify Duplicates in Dynamics 365 CRM (Step-by-Step Guide 2026)

AI-Powered WhatsApp Sentiment Analysis for Smarter Customer Support in Dynamics 365

The Ultimate Guide to AI Semantic Search in SharePoint with Microsoft Copilot

The Complete Guide to Dynamics 365 CRM + Mailchimp Integration (2026)

Top Reasons your Dynamics 365 CRM Needs a Translation App today!

Guide to Branding Your Dynamics 365 Live Chat Integration App!

Recent Posts

  • How to Customize the Task Pane in Project Operations
  • SharePoint Security and Metadata Management: A Complete Guide for CRM
  • How the AI Powered Quality Evaluation Agent Transforms Customer Interaction Quality
  • A Smarter Approach to Marketing Operations with Customer Insights – Journeys
  • How to Use Copilot Recommended Email Templates in Dynamics 365 Customer Service

Archives

SiteLock
Copyright © 2026 Inogic. All Rights Reserved
Iconic One Theme | Powered by Wordpress