I want to using plugin to automation create portal's login id and password after created an contact. But i don't know the encryption type.
*This post is locked for comments
I want to using plugin to automation create portal's login id and password after created an contact. But i don't know the encryption type.
*This post is locked for comments
Hi Justin,
I'm only updating the Security Stamp and Password hash (but only the former gets updated). Updating the fields you mentioned, didn't had impact.
After turning on audit log for password hash I noticed the field gets updated with empty values, somehow the argument "Password" never gets assigned or so it seems, and therefore the hash calculation never happens.
I still don't know why the argument (Password) isn't passed.
Thanks
Hi Isidro Goncalves,
Strange. I have tested and it worked. Do you have same step as in image. Are you updating the Login Enabled, Lockout Enabled fields in the contact in the Action steps.
OrganizationRequest req = new OrganizationRequest("new_ActionChangePassword"); req["Password"] = "password"; req["Target"] = new EntityReference("contact", new Guid("29BB87C2-8C3D-E811-A823-0003FF3917D9")); //execute the request OrganizationResponse response = _orgService.Execute(req);
Thanks
Justin Jose
Hi Justin,
my action is the same as your screenshot.
My action is executed and there're no errors. And although my "Security Stamp"
gets updated with a new Guid, "Password hash" field remains empty. I'm logged as System Administrator, so I should be able to see the value or at least some stars to indicate the field has data.
my code:
var request = new OrganizationRequest("new_changepasswd")
{
["Target"] = new EntityReference("contact", Guid.Parse("XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX")),
["Password"] = "HelloWorld"
};
Any suggestions ?
Hi Evan,
you created some thing like this
Thanks
Justin Jose
are you trying to pass the value to Dailog?
thanks
Hi Justin,
I'm create an workflow, and add steps using Adxstudio.Xrm.Workflow.Identity (1.0.0.2):Adxstudio.Xrm.Workflow.Identity.ChangePassword
Adxstudio.Xrm.Workflow.Identity (1.0.0.2):Adxstudio.Xrm.Workflow.Identity.SetSecurityStamp
But I have another question:
An error has occurred while trying to start the linked child dialog. The input arguments in the child dialog do not match those of the parent dialog. Contact your system administrator for help.
Hi Nicholas,
I'm not sure the adx_identity_securitystamp field is correct for password.
Because, I'm changed the password value as same as old password value, the password was been changed,
But the adx_identity_securitystamp field value is not change.
Hi Justin,
I want to using this method to change password, But, How to set login id and password?
private void CallingWorkflow(Guid entityId)
{
if (entityId == Guid.Empty) return;
//Adxstudio.Xrm.Workflow.Identity.ChangePassword:3f4a37bf-d77a-4231-adb4-2e12630e44e3
//Adxstudio.Xrm.Workflow.Identity.SetSecurityStamp:6ad91e81-104d-448d-88fd-b8a3ed832c4a
ExecuteWorkflowRequest request = new ExecuteWorkflowRequest();
request.WorkflowId = new Guid("6ad91e81-104d-448d-88fd-b8a3ed832c4a");
request.EntityId = entityId;
ExecuteWorkflowResponse response = service.Execute(request) as ExecuteWorkflowResponse;
request.WorkflowId = new Guid("3f4a37bf-d77a-4231-adb4-2e12630e44e3");
request.EntityId = entityId;
request.Parameters.Add("Password", "");
response = service.Execute(request) as ExecuteWorkflowResponse;
}
Hi Evan,
Please try below.
1. Create an Action with a string input parameter and call it Password.
2. Create step in the above Action using Adxstudio.Xrm.Workflow.Identity (1.0.0.2):Adxstudio.Xrm.Workflow.Identity.ChangePassword
Adxstudio.Xrm.Workflow.Identity (1.0.0.2):Adxstudio.Xrm.Workflow.Identity.SetSecurityStamp
3. Invoke Action using plugin
4. Pass the password to Action
Thanks
Justin Jose
Hi Nicholas
My code in below:
[code]
public string HashPasswordV2()
{
string password = textBox3.Text;//Password
Guid securitystamp = new Guid(textBox1.Text);//Securitystamp
byte[] salt;
byte[] buffer2;
if (password == null)
{
throw new ArgumentNullException("password");
}
using (Rfc2898DeriveBytes bytes = new Rfc2898DeriveBytes(password, securitystamp.ToByteArray(), 0x3e8))
{
salt = bytes.Salt;
buffer2 = bytes.GetBytes(0x20);
}
byte[] dst = new byte[0x31];
Buffer.BlockCopy(salt, 0, dst, 1, 0x10);
Buffer.BlockCopy(buffer2, 0, dst, 0x11, 0x20);
return Convert.ToBase64String(dst);//Hash Value
}
[/code]
I‘m test same as password and securitystamp as portal.
But the hash value is not equal portal hash value, Could you help me to find out my mistake?
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,280 Super User 2024 Season 2
Martin Dráb 230,214 Most Valuable Professional
nmaenpaa 101,156