Skip to main content

microsoft-dynamics-auth

Microsoft Power Platform auth plugin for HTTPie

Installation

$ pip install microsoft-dynamics-auth

Verify that you see msft-power-platform under --auth-type by running

$ http --help

Configuration

To be able to execute requests you must setup the credentials for the target power platform environment. This auth plugin requires a clientid and secret for an app registerd in Active Directory. You must register an app in Active Directory and add it as an application user in the target power platform environment. Once you have the app configured in both AAD and Power Platform.

Use env-generator.py included in this repository to generate the credentials file .parc in user home directory.

$ python env-generator.py

This will generate a ~/.parc file to store power platform environment credentials. Paste credentials in the following format after the prompt and then press enter")

name: [SECTION_NAME] tenant: [TENANT] key: [CLIENT-ID] secret: [CLIENT-SECRET] resource: [ENVIRONMENT-URL]\n")

For example

name: dev-contoso tenant: contoso.onmicrosoft.com key: highlyconfenditialkey secret: highlyconfidentialsecret resource: https://dev-contoso.crm.dynamics.com")

You can also manually create the ~/.parc in the following format

[default]
tenant = contoso.onmicrosoft.com
key = 52a44848-095e-4882-a880-e8b8083714d8a
secret = highly-confidential-secret
resource = https://dev-contoso.crm.dynamics.com

[dev-contoso1]
tenant = contoso.onmicrosoft.com
key = 52a44848-095e-4882-a880-e8b8083714d8a
secret = highly-confidential-secret
resource = https://dev-contoso1.crm.dynamics.com

[dev-northwind]
tenant = northwind.onmicrosoft.com
key = f4d9f805-a172-4698-9228-518013cd04c5
secret = highly-confidential-secret
resource = https://dev-northwind.crm.dynamics.com

Usage

$ http --auth-type=msft-power-platform --auth='client-key:client-secret' https://your-org-name.your-crm-region.dynamics.com/api/data/v9.0

Use HTTPie sessions

Create session

$ http --session=logged-in --auth-type=msft-dynamics --auth='client-key:client-secret' your-org-name.your-crm-region.dynamics.com

Re-use auth

$ http --session=logged-in POST your-org-name.your-crm-region.dynamics.com hello=world

Metadata

Release files for microsoft-dynamics-auth 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for microsoft-dynamics-auth 1.0.0
File Size Uploaded Provenance Actions
microsoft-dynamics-auth-1.0.0.tar.gz 3.1 kB Without provenance Details for microsoft-dynamics-auth-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for microsoft-dynamics-auth 1.0.0
File Interpreter ABI Platform Actions
microsoft_dynamics_auth-1.0.0-py3-none-any.whl Python 3 none any Details for microsoft_dynamics_auth-1.0.0-py3-none-any.whl

Total release size: 7.3 kB

Release files / microsoft-dynamics-auth-1.0.0.tar.gz

Download URL microsoft-dynamics-auth-1.0.0.tar.gz
Size 3.1 kB
Tags Source
SHA-256 checksum
How to use checksums
1b11b6714fccafd22ca7af57850e982c98a317ab75d220f59ff1a8dbae6b1e6f
BLAKE2b-256 checksum
How to use checksums
82436701b47bbe55e3d6716bf7d85ff6754fa042a19f5e567ecf8ec447c65d2a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

Release files / microsoft_dynamics_auth-1.0.0-py3-none-any.whl

Download URL microsoft_dynamics_auth-1.0.0-py3-none-any.whl
Size 4.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
609aeeae6c3cbf9e7e9a5fc2f832874f6a3dee77c003573f43c938f0e4e544e0
BLAKE2b-256 checksum
How to use checksums
2c9550d19a6bf442aeb0515c0cc77675bb77e87bb8cb1ad06c5dd4c62b194727
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

Security for microsoft-dynamics-auth 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page