searchcustomerid上的google apps无效凭据异常 [英] google apps invalid credentials exception on retrievecustomerid

查看:115
本文介绍了searchcustomerid上的google apps无效凭据异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

应用程序在entry = svcGOrgan.RetrieveCustomerId(svcGOrgan.DomainName);行上抛出异常。凭证无效。





我可以使用其他方法但是RetrieveCustomerId会抛出错误。

The app throws an exception on the line "entry = svcGOrgan.RetrieveCustomerId(svcGOrgan.DomainName);" with invalid credentials.


I am able to use other methods but RetrieveCustomerId throws error.

推荐答案

找到它的解决方案。

OrganizationService service = new OrganizationService(domain,applicationName);

service.setUserCredentials(userName,password);

service.RetrieveCustomerId(String domain)





in service.setUserCredentials(userName,password);



用户名应该替换为用户的电子邮件,如:



string username =youremailuser@domain.com;

service.setUserCredentials(username,pass);
Found solution for it.
OrganizationService service = new OrganizationService(domain, applicationName);
service.setUserCredentials(userName, password);
service.RetrieveCustomerId(String domain)


in service.setUserCredentials(userName, password);

the username should be replaced with user''s email like:

string username = "youremailuser@domain.com";
service.setUserCredentials(username, pass);


这篇关于searchcustomerid上的google apps无效凭据异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆