Last active
March 12, 2024 15:12
-
-
Save kyouheicf/ed76ee02413ce8b4fc7f4ab5c867c907 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get current config json | |
http -A creds GET https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/access/identity_providers \ | |
| jq -r '[.result[] | select (.type == "azureAD")][0]' > azureAD.json | |
# Set identity UUID | |
export AZURE_AD_UUID=$(cat azureAD.json | jq -r .id) | |
# Set "prompt" config parameter option | |
jq 'del(.id, .uid, .version) | .config.prompt = "login"' azureAD.json > tmp && mv tmp azureAD.json | |
# jq 'del(.id, .uid, .version) | .config.prompt = "select_account"' azureAD.json > tmp && mv tmp azureAD.json | |
# jq 'del(.id, .uid, .version) | .config.prompt = "none"' azureAD.json > tmp && mv tmp azureAD.json | |
# Update with "prompt" config parameter option | |
http -A creds PUT https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/access/identity_providers/$AZURE_AD_UUID @azureAD.json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment