https://github.com/devpro/azuread-jwt-generator
Command line tool to generate authentication tokens with Azure Active Directory
https://github.com/devpro/azuread-jwt-generator
authentication azure-active-directory dotnet jwt
Last synced: about 1 year ago
JSON representation
Command line tool to generate authentication tokens with Azure Active Directory
- Host: GitHub
- URL: https://github.com/devpro/azuread-jwt-generator
- Owner: devpro
- License: gpl-3.0
- Created: 2022-03-18T17:00:55.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-11-20T11:12:34.000Z (over 3 years ago)
- Last Synced: 2025-01-11T04:31:40.452Z (about 1 year ago)
- Topics: authentication, azure-active-directory, dotnet, jwt
- Language: C#
- Homepage:
- Size: 23.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Azure AD JWT Generator
Command line tool to generate authentication tokens with Azure Active Directory.
## How to use the tool
```bash
aadtokengen
```
## How to set up an application in Azure
* In [Azure Portal](https://portal.azure.com/), in "Azure Active Directory > Application registrations", select "New registration"
* Once created, update the application
* "Manifest": manually edit the file (`accessTokenAcceptedVersion` and `allowPublicClient` are null by default)
```json
{
"accessTokenAcceptedVersion": 2,
"allowPublicClient": true,
}
```
* "Api permissions": do "Grant admin consent for Default Directory" (Microsoft Graph > User.Read has been added by default)
* "Expose an API": set the application ID URI ("api://" is the default and correct choice)
* "Expose an API": add a scope (for example "access_as_user", "Admins and users" can consent)
## How to debug in Visual Studio
* Create the `src/ConsoleApp/Properties/launchSettings.json` file
```
{
"profiles": {
"ConsoleApp": {
"commandName": "Project",
"commandLineArgs": " "
}
}
}
```