I successfully installed "ms-identity-web" using a Bash-File with the command:
pip install git+https://github.com/azure-samples/ms-identity-python-utilities@main
as described in this Tutorial: https://learn.microsoft.com/en-us/training/modules/msid-django-web-app-sign-in/3-exercise-register-django-web-app
The Bash-File is executed during building with GitHub-Actions in the workflowfile.yml:
- name: Create and start virtual environment
run: |
python -m venv venv
source venv/bin/activate
- name: install MSIdentity
run : |
chmod +x MSIdent.sh
./MSIdent.sh
- name: Install dependencies
run: pip install -r requirements.txt
During Building I get the following notifiation:
Collecting git+https://github.com/azure-samples/ms-identity-python-utilities@main
Cloning https://github.com/azure-samples/ms-identity-python-utilities (to revision main) to /tmp/pip-req-build-6laxvfdk
Running command git clone --filter=blob:none --quiet https://github.com/azure-samples/ms-identity-python-utilities /tmp/pip-req-build-6laxvfdk
Resolved https://github.com/azure-samples/ms-identity-python-utilities to commit 9b32cef36c6c0b73c1b3237fdd66128d89f90a62
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Requirement already satisfied: msal<2,>=1.6.0 in /opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages (from ms-identity-web==0.16.6) (1.21.0)
Requirement already satisfied: cryptography<41,>=0.6 in /opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages (from msal<2,>=1.6.0->ms-identity-web==0.16.6) (40.0.2)
Requirement already satisfied: requests<3,>=2.0.0 in /opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages (from msal<2,>=1.6.0->ms-identity-web==0.16.6) (2.28.2)
Requirement already satisfied: PyJWT[crypto]<3,>=1.0.0 in /opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages (from msal<2,>=1.6.0->ms-identity-web==0.16.6) (2.6.0)
Requirement already satisfied: cffi>=1.12 in /opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages (from cryptography<41,>=0.6->msal<2,>=1.6.0->ms-identity-web==0.16.6) (1.15.1)
Requirement already satisfied: charset-normalizer<4,>=2 in /opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages (from requests<3,>=2.0.0->msal<2,>=1.6.0->ms-identity-web==0.16.6) (3.1.0)
Requirement already satisfied: idna<4,>=2.5 in /opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages (from requests<3,>=2.0.0->msal<2,>=1.6.0->ms-identity-web==0.16.6) (3.4)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages (from requests<3,>=2.0.0->msal<2,>=1.6.0->ms-identity-web==0.16.6) (1.26.15)
Requirement already satisfied: certifi>=2017.4.17 in /opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages (from requests<3,>=2.0.0->msal<2,>=1.6.0->ms-identity-web==0.16.6) (2022.12.7)
Requirement already satisfied: pycparser in /opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages (from cffi>=1.12->cryptography<41,>=0.6->msal<2,>=1.6.0->ms-identity-web==0.16.6) (2.21)
Building wheels for collected packages: ms-identity-web
Building wheel for ms-identity-web (setup.py): started
Building wheel for ms-identity-web (setup.py): finished with status 'done'
Created wheel for ms-identity-web: filename=ms_identity_web-0.16.6-py3-none-any.whl size=17513 sha256=8607bf7ce4f27cadc820997675df99c245606f77024bbdc7e00a5adfea7d10e4
Stored in directory: /tmp/pip-ephem-wheel-cache-4sot6plb/wheels/c8/41/b0/70a104f90dd032433652eabd8cfacc2c0e4b025db91a03b83c
Successfully built ms-identity-web
Installing collected packages: ms-identity-web
Successfully installed ms-identity-web-0.16.6
Notice: A new release of pip is available: 23.0.1 -> 23.1
Notice: To update, run: pip install --upgrade pip
But when I start running the Django App via Azure I get the following error message:
2023-04-16T10:55:23.072620824Z mod = importlib.import_module(self.SETTINGS_MODULE)
2023-04-16T10:55:23.072625224Z File "/opt/python/3.9.16/lib/python3.9/importlib/__init__.py", line 127, in import_module
2023-04-16T10:55:23.072629724Z return _bootstrap._gcd_import(name[level:], package, level)
2023-04-16T10:55:23.072634124Z File "