locked
How to check whether a given account user is valid for logging or not? RRS feed

  • Question

  • Hi all;)

    Suppose I have information like this below (I'm using online CRM for learning);)

    catcore11@catcore11.onmicrosoft.com Username

    12345abcde Password

    api.dynamics.com Domain

    And what classes (funtions) should I use to verify the account is valid or not?

    Am I using OrganizationServiceProxy or IOrgnizationService?

    Which methods should I use to pass these values? And what result means "pass" and what "fail"?

    Code samples, plz……

    Many many thanks!


    If you think one reply solves your problem, please mark it as An Answer, if you think someone's reply helps you, please mark it as a Proposed Answer

    Help by clicking:
    Click here to donate your rice to the poor
    Click to Donate
    Click to feed Dogs & Cats


    Found any spamming-senders? Please report at: Spam Report

    Wednesday, June 19, 2013 5:19 AM

Answers

  • you can pass the credentials and create an organization proxy class. Next use the Whoami api to get details of the logged in user.

    if the whoami returns an error it is an invalid user. if its valid u receive the guid of the user.

    HTH

    Sam


    Dynamics CRM MVP | Inogic | http://inogic.blogspot.com| news at inogic dot com

    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"

    Wednesday, June 19, 2013 5:31 AM
  • Here's a link to some example code:  Example Code
    • Edited by Ray in St. Louis Wednesday, June 19, 2013 3:00 PM made url a hyperlink
    • Marked as answer by ThankfulHeart Friday, June 21, 2013 7:29 AM
    Wednesday, June 19, 2013 2:59 PM

All replies