Azure-Samples / azure-search-openai-demo

A sample app for the Retrieval-Augmented Generation pattern running in Azure, using Azure AI Search for retrieval and Azure OpenAI large language models to power ChatGPT-style and Q&A experiences.
https://azure.microsoft.com/products/search
MIT License
5.91k stars 4.05k forks source link

adlsgen2setup.ps1does not run properly #1966

Open dmpai-per opened 1 week ago

dmpai-per commented 1 week ago

Please provide us with the following information:

This issue is for a: (mark with an x)

- [ x] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

i followed this guide (https://github.com/Azure-Samples/azure-search-openai-demo/blob/main/docs/login_and_acl.md#azure-data-lake-storage-gen2-setup:~:text=Azure%20Data%20Lake%20Storage%20Gen2%20Setup) to create groups and upload docs from the data folder to the storage account but script is not working

Any log messages given by the failure

image

Expected/desired behavior

groups to be created, docs to be uploaded to storage account

OS and Version?

windows 11

azd version?

run azd version and copy paste here.

Versions

azd version 1.10.1

Mention any other details that might be useful


Thanks! We'll be in touch soon.

samarjit4290 commented 1 week ago

I was getting the same issue earlier . I resolved it by adding the below 2 lines in the _create_or_getgroup method . In your create_or_get_group method, when you're constructing the group object before making the POST request to create the group, you need to add the mailEnabled property. Additionally, the mailNickname property is required for groups that have mailEnabled set to true

Original snippet code :-

group = {
    "displayName": group_name,
    "groupTypes": ["Unified"],
    "securityEnabled": self.security_enabled_groups,
}

Add the below 2 lines in this one .

"mailEnabled": False,  # Set to True if the group should have a mailbox
 "mailNickname": group_name.replace(" ", "_")  # Provide a mailNickname, even if mailEnabled is False_

Modified snippet code :-

group = {
                    "displayName": group_name,
                    "groupTypes": ["Unified"],
                    "securityEnabled": self.security_enabled_groups,
                    "mailEnabled": False,  # Add mailEnabled property
                    "mailNickname": group_name.replace(" ", "_")  # Add mailNickname
                }

However, after modifyng this code if you are still encountering error like "_AuthorizationRequestDenied: Tenant admin has not enabled Unified Group creation" , just comment out the below line :-

# "groupTypes": ["Unified"],

Hopefully it should work.

dmpai-per commented 1 week ago

@samarjit4290 thanks it is working now.

samarjit4290 commented 1 week ago

@dmpai-per You can find the groups in Azure portal directly if you have access to Entra ID (Azure Active Directory). Since you were able to create the groups , I assume you already have access to Entra ID and can view the groups as well . 👍

dmpai-per commented 1 week ago

@samarjit4290 actually i am using MS Entra ID External (this feature here https://github.com/Azure-Samples/azure-search-openai-demo/issues/1959) so i am not quite sure how to add the external users from the external tenant to the new created groups in the tenant that has the storage account.