MicrosoftDocs / azure-docs

Open source documentation of Microsoft Azure
https://docs.microsoft.com/azure
Creative Commons Attribution 4.0 International
10.22k stars 21.37k forks source link

Snippet code on official documentation is not working #107305

Closed ErSamano closed 4 months ago

ErSamano commented 1 year ago

Looks like the Python example with service principal is not working. https://learn.microsoft.com/en-us/azure/synapse-analytics/spark/data-sources/apache-spark-sql-connector#python-example-with-service-principal

On the code line when acquiring the context from msal, like context = msal.ConfidentialClientApplication(), then context variable is no longer used, since the next line use app.acquire_token_silent([scope]) here is how it should work https://github.com/AzureAD/microsoft-authentication-library-for-python/blob/dev/sample/confidential_client_secret_sample.py

app = msal.ConfidentialClientApplication( service_principal_id, service_principal_secret, authority )

token = app.acquire_token_silent([scope])


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

Naveenommi-MSFT commented 1 year ago

@ErSamano Thanks for your feedback! We will investigate and update as appropriate.

Naveenommi-MSFT commented 1 year ago

@ErSamano Thank you for bringing this to our attention. I've delegated this to content author @rwike77, who will review it and offer their insightful opinions.

Naveenommi-MSFT commented 1 year ago

@rwike77 Could you please review add comments on this, update as appropriate.

rwike77 commented 1 year ago

Hi, I'm actually not the author for this article. @eskot can you take a look? Thanks. #reassign:eskot

prmerger-automator[bot] commented 1 year ago

The following users don't have valid GitHub IDs, or are not collaborators on this repo: eskot

Naveenommi-MSFT commented 1 year ago

@midesa Could you please review add comments on this, update as appropriate.

ErSamano commented 1 year ago

Hello @Naveenommi-MSFT, @midesa any update on this?

midesa commented 1 year ago

@DaniBunny can you take a look or re-assign from the Spark team?

ErSamano commented 1 year ago

Hey @DaniBunny , @midesa is there any update on this regard?

bandersmsft commented 4 months ago

Thanks for your dedication to our documentation. Unfortunately, at this time we have been unable to review your issue in a timely manner and we sincerely apologize for the delayed response. We are closing this issue for now, but if you feel that it's still a concern, please respond and let us know. If you determine another possible update to our documentation, please don't hesitate to reach out again. #please-close