Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
9b9bead
creating workflows
paullizer Sep 23, 2025
92db48f
fraud analyssis
paullizer Sep 23, 2025
864a80e
support agents
paullizer Sep 23, 2025
4e98d2a
update
paullizer Sep 23, 2025
64080a5
fix
paullizer Sep 23, 2025
20dc12d
updated demo
paullizer Sep 23, 2025
8df0343
Swagger lite (#469)
paullizer Sep 29, 2025
d24ff83
adding support for xlsm, Macro Excel files.
paullizer Sep 29, 2025
446b71f
Merge branch 'workflows' into Development
paullizer Sep 29, 2025
e97d470
moved into features
paullizer Sep 29, 2025
adbed01
initial
paullizer Sep 30, 2025
3292be1
added readme
paullizer Sep 30, 2025
75ca487
removed html code
paullizer Sep 30, 2025
24528ac
Update config.py (#477)
Patrick-Davis-MSFT Oct 1, 2025
e37bf50
Initial Setup for Pages documentation (#479)
paullizer Oct 2, 2025
46b9163
initial
paullizer Oct 2, 2025
58b58b0
added to base
paullizer Oct 2, 2025
5cd2f28
adding real data endpoints
paullizer Oct 2, 2025
2e0942f
Update route_backend_control_center.py
paullizer Oct 2, 2025
6ec77ee
added individual charts
paullizer Oct 3, 2025
1eda535
fix for bug 485
nadoylemsft Oct 3, 2025
e42ce5c
added document metrics
paullizer Oct 4, 2025
b225502
added links to control center
paullizer Oct 4, 2025
7841e42
debug
paullizer Oct 5, 2025
f39da82
added date
paullizer Oct 6, 2025
a8221b9
fixed bugs due to branch descrepancies
cjackson202 Oct 6, 2025
3e3c8c8
added Azure SQL Driver Docker File
cjackson202 Oct 7, 2025
c93ea7b
added documentation for docker_fileSession updates
cjackson202 Oct 7, 2025
8c5c2ba
Redis Managed Identity Azure Government Support Changes
cjackson202 Oct 7, 2025
39b4528
Stop tracking ignored folders
cjackson202 Oct 8, 2025
ba1ca48
updated gitignore
cjackson202 Oct 8, 2025
95a7647
Merge branch 'cj-dev' into Development - Ensured ManagedIdentity supp…
cjackson202 Oct 8, 2025
711e0de
Merge pull request #488 from cjackson202/Development
Bionic711 Oct 10, 2025
6a3c322
Merge branch 'Development' into bugfix485
nadoylemsft Oct 10, 2025
71eff52
Merge pull request #487 from microsoft/bugfix485
Bionic711 Oct 10, 2025
33f5d8c
added sort by to table for user management
paullizer Oct 16, 2025
9e124ff
storage account size processing
paullizer Oct 16, 2025
fe75d09
Front end now shows storage account sizing
paullizer Oct 16, 2025
556f6d8
export user management list to csv
paullizer Oct 16, 2025
6e6c976
adding group management
paullizer Oct 16, 2025
f5fa596
fixing swagger generation
paullizer Oct 23, 2025
b412a60
fix
paullizer Oct 23, 2025
17e6fed
Added inline dynamic property generation
paullizer Oct 23, 2025
9ca0bf2
added YAML support
paullizer Oct 23, 2025
34b2b71
Improved muiltform vs app/json detection
paullizer Oct 23, 2025
5090eec
added Control Center Admin role
paullizer Oct 23, 2025
52ac365
ai search sizing is working for groups
paullizer Oct 24, 2025
0a0978e
group refresh fixed
paullizer Oct 24, 2025
c72dfe1
added group data fix
paullizer Oct 24, 2025
503a3e0
group table refresh
paullizer Oct 24, 2025
0f5c73f
updated export to include group docs
paullizer Oct 25, 2025
b4007c8
adding public workspace management
paullizer Oct 25, 2025
9eca474
removed sample data and consolidated row generators
paullizer Oct 25, 2025
8469bc7
Changed both caching helper functions to use the existing update_docu…
paullizer Oct 29, 2025
b520432
removed workflow, will work on that in different branch
paullizer Oct 31, 2025
044c7d9
Document Set Fingerprinting, Scope-Aware Cache Key Generation, Event-…
paullizer Nov 10, 2025
7ac37b4
added debug logging
paullizer Nov 10, 2025
3d84394
setup cache feature and ttl time to admin app settings
paullizer Nov 10, 2025
bf1f14a
removed cosmos level ttl
paullizer Nov 10, 2025
baa71a9
Keyvault for secrets (#492)
Bionic711 Nov 11, 2025
db74c0d
Feature/remove abp for pr (#510)
Bionic711 Nov 12, 2025
0fd0eae
Merge branch 'improved-search' into Development
paullizer Nov 12, 2025
2035b90
Feature/group agents actions (#521)
Bionic711 Nov 19, 2025
fab926b
Merge branch 'Data-and-Workspace-Management' into Development
paullizer Nov 19, 2025
ab0a4ef
Add cosmos activity logs container configuration
paullizer Nov 20, 2025
d50064a
incorporate branch updates Add 372 fix 489
paullizer Nov 21, 2025
41e924d
Support deployment via AZD UP (#530)
SteveCInVA Nov 23, 2025
e545917
Video Indexer, Multi-Modal Enhancements, Scope Bug
paullizer Nov 24, 2025
164459f
Conversation Management Features (#532)
paullizer Nov 24, 2025
3bf067a
Message management (#553)
paullizer Dec 19, 2025
c91d555
Configure Application from AZD Up command (#548)
SteveCInVA Dec 19, 2025
f7afced
Adds Azure Billing Plugin in Community Customizations (#546)
Bionic711 Dec 19, 2025
ef2a2a7
Security/container build (#549)
Bionic711 Dec 19, 2025
04b5c12
Feature/speech managed identity (#543)
Xeelee33 Dec 19, 2025
6a85856
Banner text color picker from Vivien (#555)
clarked-msft Dec 23, 2025
0e67ac8
Remove opencensus
clarked-msft Jan 5, 2026
460b14b
Merge pull request #559 from clarked-msft/remove-opencensus-requirement
Bionic711 Jan 6, 2026
1555dbf
Add flask instrumentation
clarked-msft Jan 6, 2026
40f5cfd
Add troubleshooting doc
clarked-msft Jan 6, 2026
74df9f8
Add troubleshooting doc
clarked-msft Jan 6, 2026
164dd80
Merge pull request #562 from clarked-msft/flask-intrumentor
Bionic711 Jan 6, 2026
3913480
Control center (#567)
paullizer Jan 13, 2026
a2bb469
Adding release notes
paullizer Jan 13, 2026
43989ac
Merge origin/main into Development - Resolved all conflicts
paullizer Jan 13, 2026
29dfbe0
fixed debug_debug_print
paullizer Jan 13, 2026
df2d77e
Updated README
paullizer Jan 13, 2026
2c7b627
Update README.md
paullizer Jan 13, 2026
9a8ce3b
Merge branch 'main' into Development
paullizer Jan 13, 2026
de013e4
accepted changes
paullizer Jan 13, 2026
49959e8
removed files
paullizer Jan 13, 2026
db0729e
GitHub Actions workflow that runs Python compilation checks on all Py…
paullizer Jan 13, 2026
1c3c133
Upated to v0.235.002
paullizer Jan 13, 2026
b20a5c7
removed debug test file
paullizer Jan 13, 2026
f70934c
Updated to v0.235.003
paullizer Jan 13, 2026
80ec215
Merge branch 'main' into Development
paullizer Jan 13, 2026
09fe817
Update python-syntax-check.yml
paullizer Jan 13, 2026
ce140f5
fixed disable group creation bug
paullizer Jan 15, 2026
4aac607
fixed bug not showing raw activity log for groups
paullizer Jan 15, 2026
9b9644e
fixed control center access to not require admin role when enabling c…
paullizer Jan 15, 2026
31ced93
fix documentation
paullizer Jan 15, 2026
e6f33c0
Update release_notes.md
paullizer Jan 15, 2026
919ed52
Update README.md
paullizer Jan 15, 2026
8878f1d
Merge branch 'main' into control-center-bug-fixes
paullizer Jan 15, 2026
646aaba
added click restrictions to top items in control center
paullizer Jan 15, 2026
2c2d92a
Merge pull request #598 from microsoft/control-center-bug-fixes
Bionic711 Jan 15, 2026
8af21bc
bug fix - fixed group member select after search, group member remova…
Xeelee33 Jan 16, 2026
3b0aa7f
Retention execution activity log (#600)
paullizer Jan 17, 2026
db25652
Merge branch 'Staging' into Development
paullizer Jan 17, 2026
7c04b7e
Merge pull request #608 from Xeelee33/bugfix/manage_group_errors
Bionic711 Jan 18, 2026
2ebfff6
added log_event to exceptions
paullizer Jan 20, 2026
5c58096
enforce-branch-flow
paullizer Jan 20, 2026
49c3a69
Merge branch 'Staging' into Development
paullizer Jan 20, 2026
d05f354
Updated searchUsers() function with inline and toast messages instead…
Xeelee33 Jan 21, 2026
3378bb9
Bugfix - removed hardcoded references to commerical cognitive service…
Xeelee33 Jan 21, 2026
db5a3f8
Support of Private Networking via Bicep / AZD (#617)
SteveCInVA Jan 21, 2026
467d7b9
Configure a user agreement that users must accept before uploading fi…
paullizer Jan 21, 2026
7525792
Merge branch 'Staging' into Development
paullizer Jan 21, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions application/single_app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
from route_backend_public_workspaces import *
from route_backend_public_documents import *
from route_backend_public_prompts import *
from route_backend_user_agreement import register_route_backend_user_agreement
from route_backend_speech import register_route_backend_speech
from route_backend_tts import register_route_backend_tts
from route_enhanced_citations import register_enhanced_citations_routes
Expand Down Expand Up @@ -617,6 +618,9 @@ def list_semantic_kernel_plugins():
# ------------------- API Public Prompts Routes ----------
register_route_backend_public_prompts(app)

# ------------------- API User Agreement Routes ----------
register_route_backend_user_agreement(app)

# ------------------- Extenral Health Routes ----------
register_route_external_health(app)

Expand Down
2 changes: 1 addition & 1 deletion application/single_app/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
EXECUTOR_TYPE = 'thread'
EXECUTOR_MAX_WORKERS = 30
SESSION_TYPE = 'filesystem'
VERSION = "0.235.025"
VERSION = "0.236.007"


SECRET_KEY = os.getenv('SECRET_KEY', 'dev-secret-key-change-in-production')
Expand Down
135 changes: 135 additions & 0 deletions application/single_app/functions_activity_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -1080,3 +1080,138 @@ def log_public_workspace_status_change(
level=logging.ERROR
)
debug_print(f"⚠️ Warning: Failed to log public workspace status change: {str(e)}")


def log_user_agreement_accepted(
user_id: str,
workspace_type: str,
workspace_id: str,
workspace_name: Optional[str] = None,
action_context: Optional[str] = None
) -> None:
"""
Log when a user accepts a user agreement in a workspace.
This record is used to track acceptance and support daily acceptance features.

Args:
user_id (str): The ID of the user who accepted the agreement
workspace_type (str): Type of workspace ('personal', 'group', 'public')
workspace_id (str): The ID of the workspace
workspace_name (str, optional): The name of the workspace
action_context (str, optional): The context/action that triggered the agreement
(e.g., 'file_upload', 'chat')
"""

try:
import uuid

# Create user agreement acceptance record
acceptance_record = {
'id': str(uuid.uuid4()),
'user_id': user_id,
'activity_type': 'user_agreement_accepted',
'timestamp': datetime.utcnow().isoformat(),
'created_at': datetime.utcnow().isoformat(),
'accepted_date': datetime.utcnow().strftime('%Y-%m-%d'), # Date only for daily lookup
'workspace_type': workspace_type,
'workspace_context': {
f'{workspace_type}_workspace_id': workspace_id,
'workspace_name': workspace_name
},
'action_context': action_context
}

# Save to activity_logs container
cosmos_activity_logs_container.create_item(body=acceptance_record)

# Also log to Application Insights for monitoring
log_event(
message=f"User agreement accepted: user {user_id} in {workspace_type} workspace {workspace_id}",
extra=acceptance_record,
level=logging.INFO
)

debug_print(f"✅ Logged user agreement acceptance: user {user_id} in {workspace_type} workspace {workspace_id}")

except Exception as e:
# Log error but don't fail the operation
log_event(
message=f"Error logging user agreement acceptance: {str(e)}",
extra={
'user_id': user_id,
'workspace_type': workspace_type,
'workspace_id': workspace_id,
'error': str(e)
},
level=logging.ERROR
)
debug_print(f"⚠️ Warning: Failed to log user agreement acceptance: {str(e)}")


def has_user_accepted_agreement_today(
user_id: str,
workspace_type: str,
workspace_id: str
) -> bool:
"""
Check if a user has already accepted the user agreement today for a given workspace.
Used to implement the "accept once per day" feature.

Args:
user_id (str): The ID of the user
workspace_type (str): Type of workspace ('personal', 'group', 'public')
workspace_id (str): The ID of the workspace

Returns:
bool: True if user has accepted today, False otherwise
"""

try:
today_date = datetime.utcnow().strftime('%Y-%m-%d')

# Query for today's acceptance record
query = """
SELECT VALUE COUNT(1) FROM c
WHERE c.user_id = @user_id
AND c.activity_type = 'user_agreement_accepted'
AND c.accepted_date = @today_date
AND c.workspace_type = @workspace_type
AND c.workspace_context[@workspace_id_key] = @workspace_id
"""

workspace_id_key = f'{workspace_type}_workspace_id'

params = [
{"name": "@user_id", "value": user_id},
{"name": "@today_date", "value": today_date},
{"name": "@workspace_type", "value": workspace_type},
{"name": "@workspace_id_key", "value": workspace_id_key},
{"name": "@workspace_id", "value": workspace_id}
]

results = list(cosmos_activity_logs_container.query_items(
query=query,
parameters=params,
enable_cross_partition_query=False # Query by partition key (user_id)
))

count = results[0] if results else 0

debug_print(f"🔍 User agreement check: user {user_id}, workspace {workspace_id}, today={today_date}, accepted={count > 0}")

return count > 0

except Exception as e:
# Log error and return False (require re-acceptance on error)
log_event(
message=f"Error checking user agreement acceptance: {str(e)}",
extra={
'user_id': user_id,
'workspace_type': workspace_type,
'workspace_id': workspace_id,
'error': str(e)
},
level=logging.ERROR
)
debug_print(f"⚠️ Error checking user agreement acceptance: {str(e)}")
return False
2 changes: 1 addition & 1 deletion application/single_app/route_backend_chats.py
Original file line number Diff line number Diff line change
Expand Up @@ -2716,7 +2716,7 @@ def generate():
credential = DefaultAzureCredential()
token_provider = get_bearer_token_provider(
credential,
"https://cognitiveservices.azure.com/.default"
cognitive_services_scope
)
gpt_client = AzureOpenAI(
api_version=api_version,
Expand Down
167 changes: 167 additions & 0 deletions application/single_app/route_backend_user_agreement.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
# route_backend_user_agreement.py

from config import *
from functions_authentication import *
from functions_settings import get_settings
from functions_public_workspaces import find_public_workspace_by_id
from functions_activity_logging import log_user_agreement_accepted, has_user_accepted_agreement_today
from swagger_wrapper import swagger_route, get_auth_security
from functions_debug import debug_print


def register_route_backend_user_agreement(app):
"""
Register user agreement API endpoints under '/api/user_agreement/...'
These endpoints handle checking and recording user agreement acceptance.
"""

@app.route("/api/user_agreement/check", methods=["GET"])
@swagger_route(security=get_auth_security())
@login_required
@user_required
def api_check_user_agreement():
"""
GET /api/user_agreement/check
Check if the current user needs to accept a user agreement for a workspace.

Query params:
workspace_id: The workspace ID
workspace_type: The workspace type ('personal', 'group', 'public', 'chat')
action_context: The action context ('file_upload', 'chat') - optional

Returns:
{
needsAgreement: bool,
agreementText: str (if needs agreement),
enableDailyAcceptance: bool
}
"""
info = get_current_user_info()
user_id = info["userId"]

workspace_id = request.args.get("workspace_id")
workspace_type = request.args.get("workspace_type")
action_context = request.args.get("action_context", "file_upload")

if not workspace_id or not workspace_type:
return jsonify({"error": "workspace_id and workspace_type are required"}), 400

# Validate workspace type
valid_types = ["personal", "group", "public", "chat"]
if workspace_type not in valid_types:
return jsonify({"error": f"Invalid workspace_type. Must be one of: {', '.join(valid_types)}"}), 400

# Get global user agreement settings from app settings
settings = get_settings()

# Check if user agreement is enabled globally
if not settings.get("enable_user_agreement", False):
return jsonify({
"needsAgreement": False,
"agreementText": "",
"enableDailyAcceptance": False
}), 200

apply_to = settings.get("user_agreement_apply_to", [])

# Check if the agreement applies to this workspace type or action
applies = False
if workspace_type in apply_to:
applies = True
elif action_context == "chat" and "chat" in apply_to:
applies = True

if not applies:
return jsonify({
"needsAgreement": False,
"agreementText": "",
"enableDailyAcceptance": False
}), 200

# Check if daily acceptance is enabled and user already accepted today
enable_daily_acceptance = settings.get("enable_user_agreement_daily", False)

if enable_daily_acceptance:
already_accepted = has_user_accepted_agreement_today(user_id, workspace_type, workspace_id)
if already_accepted:
debug_print(f"[USER_AGREEMENT] User {user_id} already accepted today for {workspace_type} workspace {workspace_id}")
return jsonify({
"needsAgreement": False,
"agreementText": "",
"enableDailyAcceptance": True,
"alreadyAcceptedToday": True
}), 200

# User needs to accept the agreement
return jsonify({
"needsAgreement": True,
"agreementText": settings.get("user_agreement_text", ""),
"enableDailyAcceptance": enable_daily_acceptance
}), 200

@app.route("/api/user_agreement/accept", methods=["POST"])
@swagger_route(security=get_auth_security())
@login_required
@user_required
def api_accept_user_agreement():
"""
POST /api/user_agreement/accept
Record that a user has accepted the user agreement for a workspace.

Body JSON:
{
workspace_id: str,
workspace_type: str ('personal', 'group', 'public'),
action_context: str (optional, e.g., 'file_upload', 'chat')
}

Returns:
{ success: bool, message: str }
"""
info = get_current_user_info()
user_id = info["userId"]

data = request.get_json() or {}
workspace_id = data.get("workspace_id")
workspace_type = data.get("workspace_type")
action_context = data.get("action_context", "file_upload")

if not workspace_id or not workspace_type:
return jsonify({"error": "workspace_id and workspace_type are required"}), 400

# Validate workspace type
valid_types = ["personal", "group", "public"]
if workspace_type not in valid_types:
return jsonify({"error": f"Invalid workspace_type. Must be one of: {', '.join(valid_types)}"}), 400

# Get workspace name for logging
workspace_name = None
if workspace_type == "public":
ws = find_public_workspace_by_id(workspace_id)
if ws:
workspace_name = ws.get("name", "")

# Log the acceptance
try:
log_user_agreement_accepted(
user_id=user_id,
workspace_type=workspace_type,
workspace_id=workspace_id,
workspace_name=workspace_name,
action_context=action_context
)

debug_print(f"[USER_AGREEMENT] Recorded acceptance: user {user_id}, {workspace_type} workspace {workspace_id}")

return jsonify({
"success": True,
"message": "User agreement acceptance recorded"
}), 200

except Exception as e:
debug_print(f"[USER_AGREEMENT] Error recording acceptance: {str(e)}")
log_event(f"Error recording user agreement acceptance: {str(e)}", level=logging.ERROR)
return jsonify({
"success": False,
"error": f"Failed to record acceptance: {str(e)}"
}), 500
Loading
Loading