Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Acquire OboToken in Mooncake failed #4939

Closed
linhu2020 opened this issue Sep 24, 2024 · 1 comment
Closed

[Bug] Acquire OboToken in Mooncake failed #4939

linhu2020 opened this issue Sep 24, 2024 · 1 comment
Labels
confidential-client needs attention Delete label after triage untriaged Do not delete. Needed for Automation

Comments

@linhu2020
Copy link

Library version used

4.57.0

.NET version

.net6.0

Scenario

ConfidentialClient - web api (AcquireTokenOnBehalfOf)

Is this a new or an existing app?

None

Issue description and reproduction steps

We hosted a 1st party aad app and it is already onboarded into GCC&GCCH. Recently we planed to onboard to Mooncake. Whe n we started integration test calling graph api, we got below error:
AADSTS90002: Tenant 'b94d39f7-7074-4894-98a5-9162bdefa33a' not found. Check to make sure you have the correct tenant ID and are signing into the correct cloud. Check with your subscription administrator, this may happen if there are no active subscriptions for the tenant. Trace ID: 0e734e19-0213-48fa-a43d-909bbbe84000 Correlation ID: e3a12926-f109-4377-8b85-7fc3790f9a1b Timestamp: 2024-09-24 02:37:09Z

This request is from Mooncake cloud.
Pls help investigate the error. Thanks in advance.

Relevant code snippets

// Use the user assertion (the token sent by the user along with their UPN)
UserAssertion userAssertion = new UserAssertion(
    ${userToken},
    "urn:ietf:params:oauth:grant-type:jwt-bearer");
var authority = "https://login.partner.microsoftonline.cn/b94d39f7-7074-4894-98a5-9162bdefa33a"
var scopes = [https://microsoftgraph.chinacloudapi.cn/.default]
var tokenRequestBuilder = this.confidentialClientApplication.AcquireTokenOnBehalfOf(scopes, userAssertion)
        .WithTenantIdFromAuthority(new Uri(authority))
        .WithForceRefresh(true)
        .WithSendX5C(true);

Expected behavior

No response

Identity provider

Microsoft Entra ID (Work and School accounts and Personal Microsoft accounts)

Regression

No response

Solution and workarounds

No response

@linhu2020 linhu2020 added needs attention Delete label after triage untriaged Do not delete. Needed for Automation labels Sep 24, 2024
@bgavrilMS
Copy link
Member

Sorry @linhu2020, the SDK cannot investigate bad config. You are expected to configure the correct tenant.

@bgavrilMS bgavrilMS closed this as not planned Won't fix, can't repro, duplicate, stale Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confidential-client needs attention Delete label after triage untriaged Do not delete. Needed for Automation
Projects
None yet
Development

No branches or pull requests

2 participants