B2B与Microsoft Graph(B2B with Microsoft Graph)
正如您可能知道的那样,我正在创建一个使用B2B功能的多租户天青应用程序。
我正在测试B2B功能,经过一些研究,我得到了一个工作示例。
小摘要:用户根据共同权限进行身份验证,第一个令牌是通过授权代码的共同权限获取的,从那时起,每当我需要服务客户端时,我都会尝试从“当前租户”权限中获取这些令牌。
当我要求'我'时,它只能对付住户。 当我向可信租户索要我的信息时,出现错误消息,表示我的用户标识符不存在于目录中。 可能因为用户实际上并不存在于可信租户中。
当我要求用户时,它工作正常。 我可以同时获得住房租户用户和可信租户用户。
这是正常的行为吗? 这是我需要以编程方式处理的事情,还是通过使用AD图解决了这个问题? (所以当我知道我需要用户信息时,只需查询主租户?)或者这是一个错误?
任何想法都将不胜感激!
As you probably know, I am creating a multi-tenant azure application, which is using the B2B functionallity.
I am testing the B2B functionality and after some research I got a working sample.
Small summary: User authenticates against common authority, first token is acquired via common authority with the authorization code and from then, everytime I need a service client, I try to obtain those tokens from the 'current tenants' authority.
When I request 'Me', it only works against the home tenant. When I request me with a trusted tenant, I got an error that my user identifier does not exist in the directory. Probably because user does not actually exist in the trusted tenant.
When I request Users, it works fine. I can get both, home tenant users and trusted tenant users.
Is this normal behaviour? Is this something I need to handle programmatically or would this been solved by using the AD graph? (So when I know I need user info, just query the home tenant?) Or is this a bug?
Any thoughts on this would be greatly appreciated!
原文:https://stackoverflow.com/questions/40658837
最满意答案
当计算机上的组策略重置测试执行所需的自动登录注册表项时,通常会发生此问题,而部署测试代理步骤尝试设置此注册表项。
要使测试代理以交互方式运行,我们需要在该框上有一个有效的用户会话,并且如果该会话不存在,那么通过自动登录创建该会话。
因此,请检查您是否为您的测试机启用了自动登录功能,或者是否有任何组策略限制了自动登录功能。
请尝试下面的内容来缩小问题的范围:
如果您之前已成功执行过测试,只需尝试重新启动测试机器并取消选中“ 高级 ”下的“ 更新测试代理 ”(默认情况下已选中并且每次都强制重新安装TA)。
如果以前没有执行过,则可以尝试下载测试代理2015,然后手动安装在该机器上并检查结果。
如果这不起作用,那么请尝试:
- 配置为服务并使用,如果这是一个选项。
- 要求您的IT管理员为自己的测试机器禁用自动登录的域策略。
另一方面,您可能会尝试找到另一台测试机器来测试测试代理是否可以在其上部署良好。
This issue usually happens when the group policy on the machine resets the Autologon registry key required for test execution, while the deploy test agent step tries to set this registry key.
For Test agent to run interactively, we need to have a valid user session on the box and if that session is not present then via autologon to create that session.
So, please check if you have enabled the autologon for your test machine, or any group policies restrict the autologon.
Please try below things to narrow down the issue:
If you have successfully performed the test before, just try to reboot the test machine and uncheck ‘Update Test Agent’ under “Advanced” (by default it’s selected and forces to reinstall TA everytime).
If not performed before, you could try to download the test agent 2015, then install it on that machine manually and check the result.
If that doesn't work, then try:
- Configure as service and use if that is an option.
- Ask your IT admin to disable your domain policies around autologon for your test machines.
On the other hand, you may try to find another test machine to test if test agents can be deployed well on it.
相关问答
更多-
当计算机上的组策略重置测试执行所需的自动登录注册表项时,通常会发生此问题,而部署测试代理步骤尝试设置此注册表项。 要使测试代理以交互方式运行,我们需要在该框上有一个有效的用户会话,并且如果该会话不存在,那么通过自动登录创建该会话。 因此,请检查您是否为您的测试机启用了自动登录功能,或者是否有任何组策略限制了自动登录功能。 请尝试下面的内容来缩小问题的范围: 如果您之前已成功执行过测试,只需尝试重新启动测试机器并取消选中“ 高级 ”下的“ 更新测试代理 ”(默认情况下已选中并且每次都强制重新安装TA)。 如果 ...
-
在Vnext TFS 15中运行Functional Tests步骤非常缓慢(Run Functional Tests step in Vnext TFS 15 is awfully slow)[2023-07-25]
好的,情况是,测试在测试运行开始时分发,而测试运行器本身现在工作不同。 不像桶系统一个接一个地分发测试。另外,测试仅在失败或完成后显示,因此如果200个测试分发,它将只显示所有200个测试完成时的结果。 有点尴尬.. Ok so case is that the tests get distributed at the start of the test run and the test runner itself works different now. Unlike bucket system that ... -
Redmine的功能测试?(Functional Tests in Redmine?)[2022-04-12]
PollsControllerTest有可疑代码: assert_equal 'Vote saved.', expect(flash[:notice]) 你可能意味着: assert_equal 'Vote saved.', flash[:notice] You have a suspicious code in PollsControllerTest: assert_equal 'Vote saved.', expect(flash[:notice]) you probably mean: asse ... -
登录后如何获取cookie。 可以模拟登录过程,从中找到表单的take action属性以及用户名和密码的字段名称。 查看用于存储会话密钥的cookie,假设它是sid 。 get_cookie.py : import requests r = requests.post(action, data={'login': 'your_username', 'password': 'You_p@ssw0rd'}, allow_redire ...
-
解决方案是您可以单独配置测试代理:配置代理,然后运行测试,然后配置另一个代理并运行测试。 The solution is that you can configure test agent separately: configure a agent, then run test, then configure another agent and run test.
-
TFS 2010中的功能测试(Functional tests in TFS 2010)[2022-04-25]
1)如果使用MSTest编写测试,则会更容易。 如果使用NUnit或其他,则可以从命令行运行它。 2)我们使用NUnitForms ,一个扩展NUnit的框架。 它是开源的,非常小,你可以做很酷的事情,比如在显示模态对话框时定义处理程序方法。 例如,我们使用它在功能测试中自动登录。 不确定您是否可以使用CodedUI执行此类操作。 3)如果您已经在使用Hudson,它可以运行MSTest和NUnit项目。 我会坚持下去。 4)有一个项目可以让你一起使用SVN和TFS,但正如之前的答案所示,我会避免使用TFS ... -
TFS2015运行功能测试 - Windows安全性提示输入凭据(TFS2015 Run Functional Tests - Windows Security prompt for credentials)[2022-03-29]
您在测试代理部署步骤中使用的帐户需要具有对TFS的访问权限。 这不是使用PAS进行身份验证,而是使用AD凭据进行身份验证,与用于运行服务的证书相同。 The account that you use in the Test Agent deployment step needs to have access to TFS. This is not authenticated using PAS but AD credentials, the same ones that are used to run th ... -
您遇到的问题是iAmLoggedInAsUserId方法直接在laravel框架上执行调用,其后续指令是基于浏览器/ mink的。 这就像拥有一个PHP脚本,您从命令行运行该脚本,将登录用户设置(执行)为123,然后转到Web浏览器 - 用户123将不会在该上下文中登录。 您需要找到一种方法,使基于代码的身份验证能够持久保存到您的浏览器测试中。 可能的选择: iAmLoggedInAsUserId的聚合指令,它进入登录页面并执行登录。 劫持mink使用的会话,并更新它以登录 一个仅限本地的工作可以让你设置一 ...
-
如何在Symfony 2.3中的功能测试中登录会话中的用户?(How to log in User in Session within a Functional Test in Symfony 2.3?)[2022-05-26]
最后我解决它! 这是工作代码的例子: use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; use Symfony\Component\BrowserKit\Cookie; class ProfileControllerTest extends WebTestCase { protecte ... -
我想NullTunnel是你在找什么? I found the answer. I had to change the tunnel to Local Selenium. Download the latest version of ChromeDriver Set tunnel to 'NullTunnel' Run chromedriver --port=4444 --url-base=wd/hub Set your environments capabilities to [ { browserNam ...