private void Cred(ref Dictionary <string, string> fields, string applicationName) { string userName; string[] labels; int[] flags; try { Microsoft.BizTalk.SSOClient.Interop.ISSOMapper ssoMapper = (Microsoft.BizTalk.SSOClient.Interop.ISSOMapper) new Microsoft.BizTalk.SSOClient.Interop.SSOMapper(); ssoMapper.GetFieldInfo(applicationName, out labels, out flags); Microsoft.BizTalk.SSOClient.Interop.ISSOLookup1 ssoLookup = (Microsoft.BizTalk.SSOClient.Interop.ISSOLookup1) new Microsoft.BizTalk.SSOClient.Interop.SSOLookup(); string[] creds = ssoLookup.GetCredentials(applicationName, 0, out userName); fields.Add(labels[0], userName); for (int i = 0; i < creds.Length; i++) { fields.Add(labels[i + 1], creds[i]); } } catch (Exception exe) { userName = ""; fields.Add("Error", exe.Message); // return new string[] { exe.Message }; } }
public static string[] GetAllSSOconfig() { string[] applicationList; string[] desc; string[] cInfo; Microsoft.BizTalk.SSOClient.Interop.ISSOMapper mapper = new Microsoft.BizTalk.SSOClient.Interop.ISSOMapper(); mapper.GetApplications(out applicationList, out desc, out cInfo); return(applicationList); }
public static object[] GetWindowsUserMapping(string userAccount, string applicationName) { Microsoft.BizTalk.SSOClient.Interop.ISSOMapper mapper = new Microsoft.BizTalk.SSOClient.Interop.ISSOMapper(); string[] tt = userAccount.Split('\\'); return(mapper.GetMappingsForWindowsUser(tt[0], tt[1], applicationName)); }