-
Notifications
You must be signed in to change notification settings - Fork 202
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] Extractor failing with subscription id incorrectly formatted #460
Labels
question
Further information is requested
Comments
|
We haven't seen this error before. Is it possible that the subscription is inactive or something odd like that? |
No the subscription is active. I managed to work around the issue by removing the dynamic assignment of the subscription id, I then created a variable in the group called "AZURESUBSCRIPTIONID" and used the modified script below:
[cid:b43b10f9-e176-479f-b36a-5ceaa46e9ee0]
Thanks for the prompt response.
AA
Alnoor Alidina
Sr. Applications Architect, Solutions Delivery
Ontario Medical Association
■
T 416.599.2580 ext. 3086 TF 1.800.268.7215 ext. 3086
150 Bloor St. West, Suite 900, Toronto, ON M5S 3C1
oma.org<https://www.oma.org>
Facebook<https://www.facebook.com/Ontariosdoctors/> | Twitter<https://twitter.com/ontariosdoctors> | Instagram<https://www.instagram.com/ontariosdoctors/> | YouTube<https://www.youtube.com/user/OntMedAssociation> | LinkedIn<https://www.linkedin.com/organization-guest/company/ontario-medical-association?challengeId=AQGdOp6XePYVKQAAAXMGTu62OwybvmRqOTI9r9wP-GdGgBm0Is8Mv65Fxm4jhQ_vvVTJ1eCXiNtCyWBph4VH8saK4Tw4445BKQ&submissionId=35e3a3d1-0163-1d16-4bc2-4d9b1f345375>
…________________________________
From: Wael Kdouh ***@***.***>
Sent: Monday, January 15, 2024 7:12 PM
To: Azure/apiops ***@***.***>
Cc: Alidina, Alnoor ***@***.***>; Author ***@***.***>
Subject: Re: [Azure/apiops] [BUG] Extractor failing with subscription id incorrectly formatted (Issue #460)
EXTERNAL
Do not click any links or attachments unless you recognize the sender and know the content is safe.
We haven't seen this error before. Is it possible that the subscription is inactive or something odd like that?
—
Reply to this email directly, view it on GitHub<#460 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AOQ6XPEVBS2NPVXHNU5B5BTYOXAXDAVCNFSM6AAAAABB36APQOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOJSHA4TONZXHA>.
You are receiving this because you authored the thread.
|
I can't see the script you are referring to. |
- task: ***@***.***
displayName: Set extraction variables
inputs:
azureSubscription: "$(SERVICE_CONNECTION_NAME)"
scriptType: pscore
scriptLocation: inlineScript
inlineScript: |
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$VerbosePreference = "Continue"
$InformationPreference = "Continue"
Write-Host "##vso[task.setvariable issecret=true;variable=AZURE_BEARER_TOKEN]$(az account get-access-token --query "accessToken" --output tsv)"
Write-Host "##vso[task.setvariable issecret=true;variable=AZURE_CLIENT_ID]$env:servicePrincipalId"
Write-Host "##vso[task.setvariable issecret=true;variable=AZURE_CLIENT_SECRET]$env:servicePrincipalKey"
Write-Host "##vso[task.setvariable issecret=true;variable=AZURE_TENANT_ID]$env:tenantId"
Write-Host "##vso[task.setvariable issecret=true;variable=AZURE_SUBSCRIPTION_ID]$env:AZURE_SUBSCRIPTION_ID"
addSpnToEnvironment: true
failOnStandardError: true
env:
AZURE_SUBSCRIPTION_ID: $(AZURESUBSCRIPTIONID)
Alnoor Alidina
Sr. Applications Architect, Solutions Delivery
Ontario Medical Association
■
T 416.599.2580 ext. 3086 TF 1.800.268.7215 ext. 3086
150 Bloor St. West, Suite 900, Toronto, ON M5S 3C1
oma.org<https://www.oma.org>
Facebook<https://www.facebook.com/Ontariosdoctors/> | Twitter<https://twitter.com/ontariosdoctors> | Instagram<https://www.instagram.com/ontariosdoctors/> | YouTube<https://www.youtube.com/user/OntMedAssociation> | LinkedIn<https://www.linkedin.com/organization-guest/company/ontario-medical-association?challengeId=AQGdOp6XePYVKQAAAXMGTu62OwybvmRqOTI9r9wP-GdGgBm0Is8Mv65Fxm4jhQ_vvVTJ1eCXiNtCyWBph4VH8saK4Tw4445BKQ&submissionId=35e3a3d1-0163-1d16-4bc2-4d9b1f345375>
…________________________________
From: Wael Kdouh ***@***.***>
Sent: Monday, January 15, 2024 7:21 PM
To: Azure/apiops ***@***.***>
Cc: Alidina, Alnoor ***@***.***>; Author ***@***.***>
Subject: Re: [Azure/apiops] [BUG] Extractor failing with subscription id incorrectly formatted (Issue #460)
EXTERNAL
Do not click any links or attachments unless you recognize the sender and know the content is safe.
I can't see the script you are referring to.
—
Reply to this email directly, view it on GitHub<#460 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AOQ6XPGADIJ7ACS3PVOKNBLYOXBXDAVCNFSM6AAAAABB36APQOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOJSHEYDENZUGE>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
If your issue is resolved please remember to close the issue. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Release version
v5.0.1
Describe the bug
When running the pipeline the extractor is failing with the error:
System.Net.Http.HttpRequestException: HTTP request to URI https://management.azure.com/subscriptions/***/resourceGroups/PaaS/providers/Microsoft.ApiManagement/service/APIM-D/namedValues?api-version=2022-04-01-preview failed with status code 400. Content is '{"error":{"code":"InvalidSubscriptionId","message":"The provided subscription identifier '***' is malformed or invalid."}}'.
However, I checked the variable it has the correct subscription id in the format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Also in the step Set extraction variables the debug print shows the correct subscription id:
Not sure what am I missing?
Expected behavior
The extractor should work fine.
Actual behavior
Getting the error described above
Reproduction Steps
Run the extractor pipeline with an account with multiple subscriptions.
The text was updated successfully, but these errors were encountered: