semvec/pypi-packages huggingface dataset:
auto-blob-saver 0.1.2
Save your blobs automatically.
Requires Python: >=3.8

# auto-blob-saver

[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)

Save your blobs automatically.

## Table of Contents

- [Install](#install)
- [Usage](#usage)
- [Maintainers](#maintainers)
- [Contributing](#contributing)
- [License](#license)

## Install

NOTE: You need to install tsschecker first.

```
1. Get the latest release by running pip install auto-blob-saver
3. Run 'auto_blob_saver' command
4. Once it's off, edit ~/.auto_blob_saver/devices.json for your phone
5. Run 'auto_blob_saver' command again and enjoy!

Automatically updates tsschecker's cached data since 'v0.1.2'.
```

## Usage

```
usage: auto_blob_saver [-h] [--devices DEVICES_JSON_PATH] [--shsh SHSH_DIRECTORY_PATH] [--time MILLISECONDS]

optional arguments:
  -h, --help            show this help message and exit
  --devices DEVICES_JSON_PATH
                        Sets the devices.json path
  --shsh SHSH_DIRECTORY_PATH
                        Sets the shsh directory path
  --time MILLISECONDS, -t MILLISECONDS
                        Sets shsh download time interval
```

## Maintainers

[@Helloyunho](https://github.com/Helloyunho)

## Contributing

PRs accepted.

Small note: If editing the README, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification.

## License

MIT © 2020 Helloyunho
pdynamics 0.2.4
Python connector for Microsoft Dynamics 365, supports AD, IFD and Online

# Python connector for Dynamics 365
## How to Install
```
pip install pdynamics
```
## Usage
```
from pdynamics import crm
```
### On-Premises
#### AD
Connect on-premises organizations via user and password

AD access sample:
```python
crmurl = 'http://servername:port/orgname/'
user = 'domain\\username'
password = 'yourpassword'
crmorg = crm.client(crmurl, user, password)
crmorg.test_connection()
```
#### IFD
Connect to Dynamics 365 IFD organizations, access_token is required to send requests, it's necessary to create an application group, it has a client id. For example: client id is: 289c7417-83b7-41c3-8fab-68f111b5ba60, and CRM IFD URL is https://mycrmorg.company.com:443/

Run powershell as Admin on AD FS server

```powershell
PS C:\windows\system32> Grant-AdfsApplicationPermission
cmdlet Grant-AdfsApplicationPermission at command pipeline position 1
Supply values for the following parameters:
ClientRoleIdentifier: 289c7417-83b7-41c3-8fab-68f111b5ba60
ServerRoleIdentifier: https://mycrmorg.company.com:443/
```
What's the token endpoint?

When log in CRM, system will redirect to ADFS login page, url is something like https://mycrmorg.company.com:5555/adfs/ls/?wa=wsignin1.0&wtrealm=....., then your token endpoint will be https://mycrmorg.company.com:5555/adfs/oauth2/token

IFD Connection Sample:
```python
crmurl = 'https://mycrmorg.company.com:443/'
tokenurl = 'https://mycrmorg.company.com:5555/adfs/oauth2/token'
user = 'domain\\username'
password = 'yourpassword'
clientid = '289c7417-83b7-41c3-8fab-68f111b5ba60'
crmorg = crm.client(crmurl, user, password, clientid, tokenurl)
crmorg.test_connection()
```
### Online
Access Dynamics 365 Online:

1. Go to office 365 admin center -> Azure Active Directory or https://aad.portal.azure.com/yourcompanydomain
2. Azure Active Directory -> App registrations -> Register an application
    a. input a Name
    b. select "Accounts in this organizational directory only (Single tenant)" - other options might also work
    c. Manage -> Certificates & secrets -> New client secret (keep this client_secret for later use)
    d. API permissions -> Add a permission -> Select an API -> Microsoft APIs-> Dynamics CRM
    e. Grant admin consent for '{your company}'
    f. Find client id (Application ID) in Overview page 

Dynamics 365 Online Connection Sample:
```python
crmurl = 'https://mycrmorg.crm.dynamics.com/'
user = 'username@mycrmorg.onmicrosoft.com'
password = 'yourpassword'
clientid = '289c7417-83b7-41c3-8fab-68f111b5ba60'
clientsecret = 'Pq-oEk~_7044Q2V~QGXwaH~2v9k0qlSG1K'
crmorg = crm.client(crmurl, user, password, clientid, client_secret=clientsecret)
crmorg.test_connection()
```