Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Developing Power bi embedded web-app written in django (python). I retrive workspace, dashboards and report successfully, I also get capacity informations against azure portal , all this by using access token retrived in the following way (using adal python module):
def azure_auth():
context = adal.AuthenticationContext(
settings.PBI_AUTHORITY,
validate_authority=True,
api_version=None)
token_response = context.acquire_token_with_username_password(
settings.PBI_RESOURCE,
settings.PBI_USERNAME,
settings.PBI_PASSWORD,
settings.PBI_CLIENTID
)
aad_token = token_response['accessToken']
headers = {'Authorization': 'Bearer ' + aad_token}
return headersdef get_capacities(headers):
capacities_request = requests.get(
"https://api.powerbi.com/v1.0/myorg/capacities", headers=headers)
print("HTTP response:" + str(capacities_request))
obj = json.loads(capacities_request.text)
print("capacities: \n" + str(obj))def resume_pbi_capacity(headers):
response = requests.post('https://management.azure.com/subscriptions/SUBSCRIPTION_ID/resourceGroups/RESOURCE_GROUP_NAME/providers/Microsoft.PowerBIDedicated/capacities/CAPACITY_NAME/resume?api-version=2017-10-01', headers)
print(response)The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 |
| User | Count |
|---|---|
| 11 | |
| 7 | |
| 4 | |
| 4 | |
| 3 |