@optum/pontifex-aad
v1.3.2
Published
Module for connecting to Azure AD to perform Pontifex activities
Downloads
29
Readme
About The Project
Helper package for managing App Registrations, App Roles, and permission granting within Azure Active Directory.
Built With
Getting Started
Installation
- Clone the repo
git clone https://github.com/Optum/pontifex-aad.git
- Install NPM packages
npm install
Usage
Creating an App Registration and associated Service Principal
const application = await pontifex.application.create({
"displayName": `${environment}-${request.applicationName}`,
"api": {
"requestedAccessTokenVersion": 2 // tell AAD to use v2 OAuth2 tokens
}
})
context.log(`application created. objectId: ${application.id}, appId: ${application.appId}`)
context.log(`creating service principal for appId ${application.appId}`)
await pontifex.servicePrincipal.create(application.appId)
Granting Access to an App Role
const roleAssignmentId = await pontifex.servicePrincipal.grantPermission(clientServicePrincipal.id,
resourceServicePrincipal.id, appRole.id)
Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
License
Distributed under the Apache 2.0 License. See LICENSE.txt
for more information.
Maintainers
- Alexander Aavang
- GitHub Enterprise: aaavang
- Email: [email protected], [email protected]